-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/disable shipping methods on paypal #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
praweb
wants to merge
13
commits into
master
Choose a base branch
from
feature/disable_shipping_methods_on_paypal
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cc096c2
add gift cards to generate summary
4df4ba7
Add changes for gift cards
ba24f73
add the disabled ability
6c331d2
integrate with OMS Customer Order
8e1fce6
remove debug statement
9cabc5f
solve conflicts
33e36c7
Merge branch 'feature/integrate_shift_oms' of https://github.com/shif…
6525b62
bump version
e229c99
Update lib/paypal_express/generate_summary.rb
e4cb7a2
add comments for gift card summary
b85451e
Add auth amount in the additional info api call
48d0a4d
Merge branch 'feature/add_paypal_auth_amount' of https://github.com/s…
feb7279
add monkey patch back in
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class BillingAddress < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class Customer < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
| require "flex_commerce_api/api_base" | ||
| module FlexCommerce | ||
| module OMS | ||
| class CustomerOrder < FlexCommerceApi::OMS::ApiBase | ||
| has_many :payments, class_name: "::FlexCommerce::OMS::Payments" | ||
| has_many :line_items, class_name: "::FlexCommerce::OMS::LineItem" | ||
| has_many :discounts, class_name: "::FlexCommerce::OMS::Discount" | ||
| has_many :shipping_address, class_name: "::FlexCommerce::OMS::Address" | ||
| has_one :billing_address, class_name: "::FlexCommerce::OMS::Address" | ||
| has_one :customer, class_name: "::FlexCommerce::OMS::Customer" | ||
| has_one :shipping_method, class_name: "::FlexCommerce::OMS::ShippingMethod" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class Discount < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class LineItem < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class Payment < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class ShippingAddress < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| require "flex_commerce_api/oms/api_base" | ||
|
|
||
| module FlexCommerce | ||
| module OMS | ||
| class ShippingMethod < FlexCommerceApi::OMS::ApiBase | ||
| belongs_to :customer_order, class_name: "::FlexCommerce::OMS::CustomerOrder" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| require "flex_commerce_api/base_resource" | ||
|
|
||
| module FlexCommerceApi | ||
| module OMS | ||
| class ApiBase < FlexCommerceApi::BaseResource | ||
| def self.endpoint_version | ||
| "v1/oms" | ||
| end | ||
|
|
||
| reconfigure | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| module FlexCommerceApi | ||
| VERSION = "0.8.3" | ||
| VERSION = "0.8.4" | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| require "json_api_client/version" | ||
| if ["1.5.3"].include?(JsonApiClient::VERSION) | ||
| require "json_api_client/resource" | ||
| module JsonApiClient | ||
| class Resource | ||
| def save | ||
| return false unless valid? | ||
|
|
||
| self.last_result_set = if persisted? | ||
| self.class.requestor.update(self) | ||
| else | ||
| self.class.requestor.create(self) | ||
| end | ||
|
|
||
| if last_result_set.has_errors? | ||
| fill_errors | ||
| false | ||
| else | ||
| self.errors.clear if self.errors | ||
| mark_as_persisted! | ||
| if updated = last_result_set.first | ||
| self.attributes = updated.attributes | ||
| # This line has been added as part of https://github.com/chingor13/json_api_client/pull/238 | ||
| self.links.attributes = updated.links.attributes | ||
| self.relationships.attributes = updated.relationships.attributes | ||
| clear_changes_information | ||
| # This line has been added as part of https://github.com/JsonApiClient/json_api_client/pull/285 | ||
| self.relationships.clear_changes_information | ||
| end | ||
| true | ||
| end | ||
| end | ||
| end | ||
| end | ||
| else | ||
| raise %q( | ||
| Please check these two PRs: | ||
| * https://github.com/chingor13/json_api_client/pull/238 (This was released in version 1.5.0) | ||
| * https://github.com/JsonApiClient/json_api_client/pull/285 (This hasn't yet been released at the time of writing this) | ||
| If both have been merged into the gem version you are using, remove this file (#{__FILE__}). | ||
| If not, add the current version to the allowed array at the top of this file. | ||
| ) | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class also does something for gift cards now; it might need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. It's simply subtracting gift card amount from total amount but I will update it.