bigcommerce 1.0.0.beta → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +115 -39
  3. data/bigcommerce.gemspec +12 -13
  4. data/lib/bigcommerce.rb +5 -34
  5. data/lib/bigcommerce/config.rb +14 -0
  6. data/lib/bigcommerce/connection.rb +26 -0
  7. data/lib/bigcommerce/exception.rb +25 -18
  8. data/lib/bigcommerce/request.rb +8 -9
  9. data/lib/bigcommerce/resource_actions.rb +11 -11
  10. data/lib/bigcommerce/resources/content/blog_post.rb +3 -5
  11. data/lib/bigcommerce/resources/content/blog_tag.rb +2 -3
  12. data/lib/bigcommerce/resources/content/redirect.rb +2 -2
  13. data/lib/bigcommerce/resources/customers/customer.rb +22 -2
  14. data/lib/bigcommerce/resources/customers/customer_address.rb +5 -5
  15. data/lib/bigcommerce/resources/customers/customer_group.rb +2 -2
  16. data/lib/bigcommerce/resources/geography/country.rb +4 -3
  17. data/lib/bigcommerce/resources/geography/state.rb +6 -5
  18. data/lib/bigcommerce/resources/marketing/banner.rb +21 -0
  19. data/lib/bigcommerce/resources/marketing/coupon.rb +2 -2
  20. data/lib/bigcommerce/resources/marketing/gift_certificates.rb +25 -0
  21. data/lib/bigcommerce/resources/orders/order.rb +46 -44
  22. data/lib/bigcommerce/resources/orders/order_coupon.rb +5 -5
  23. data/lib/bigcommerce/resources/orders/order_message.rb +8 -7
  24. data/lib/bigcommerce/resources/orders/order_product.rb +37 -36
  25. data/lib/bigcommerce/resources/orders/order_shipping_address.rb +24 -23
  26. data/lib/bigcommerce/resources/orders/order_status.rb +2 -1
  27. data/lib/bigcommerce/resources/orders/order_tax.rb +8 -7
  28. data/lib/bigcommerce/resources/orders/shipment.rb +11 -10
  29. data/lib/bigcommerce/resources/products/brand.rb +2 -2
  30. data/lib/bigcommerce/resources/products/bulk_pricing_rule.rb +6 -5
  31. data/lib/bigcommerce/resources/products/category.rb +2 -2
  32. data/lib/bigcommerce/resources/products/configurable_field.rb +6 -5
  33. data/lib/bigcommerce/resources/products/custom_field.rb +6 -5
  34. data/lib/bigcommerce/resources/products/google_product_search_mapping.rb +9 -8
  35. data/lib/bigcommerce/resources/products/option.rb +2 -2
  36. data/lib/bigcommerce/resources/products/option_set.rb +2 -2
  37. data/lib/bigcommerce/resources/products/option_set_option.rb +2 -1
  38. data/lib/bigcommerce/resources/products/option_value.rb +1 -0
  39. data/lib/bigcommerce/resources/products/product.rb +61 -61
  40. data/lib/bigcommerce/resources/products/product_image.rb +4 -4
  41. data/lib/bigcommerce/resources/products/product_option.rb +2 -1
  42. data/lib/bigcommerce/resources/products/product_review.rb +1 -5
  43. data/lib/bigcommerce/resources/products/product_rule.rb +4 -4
  44. data/lib/bigcommerce/resources/products/product_video.rb +4 -4
  45. data/lib/bigcommerce/resources/products/sku.rb +15 -9
  46. data/lib/bigcommerce/resources/shipping/shipping_method.rb +2 -1
  47. data/lib/bigcommerce/resources/store/store_information.rb +18 -14
  48. data/lib/bigcommerce/resources/system/time.rb +2 -2
  49. data/lib/bigcommerce/resources/tax/tax_class.rb +2 -1
  50. data/lib/bigcommerce/resources/webhooks/webhook.rb +2 -1
  51. data/lib/bigcommerce/subresource_actions.rb +14 -14
  52. data/lib/bigcommerce/version.rb +1 -1
  53. metadata +47 -166
  54. data/.gitignore +0 -17
  55. data/.rspec +0 -2
  56. data/.rubocop.yml +0 -620
  57. data/.travis.yml +0 -15
  58. data/CHANGELOG.md +0 -11
  59. data/CONTRIBUTING.md +0 -119
  60. data/DEPENDENCIES.md +0 -7
  61. data/Gemfile +0 -15
  62. data/Guardfile +0 -22
  63. data/LICENSE +0 -20
  64. data/RELEASING.md +0 -64
  65. data/Rakefile +0 -13
  66. data/examples/README.md +0 -148
  67. data/examples/configuration/legacy_auth.rb +0 -12
  68. data/examples/configuration/oauth.rb +0 -9
  69. data/examples/content/blog_post.rb +0 -39
  70. data/examples/content/blog_tag.rb +0 -10
  71. data/examples/content/redirect.rb +0 -43
  72. data/examples/customers/customer.rb +0 -36
  73. data/examples/customers/customer_address.rb +0 -50
  74. data/examples/customers/customer_group.rb +0 -35
  75. data/examples/exception_handling.rb +0 -50
  76. data/examples/geography/country.rb +0 -16
  77. data/examples/geography/state.rb +0 -19
  78. data/examples/marketing/coupon.rb +0 -44
  79. data/examples/orders/order.rb +0 -53
  80. data/examples/orders/order_coupon.rb +0 -17
  81. data/examples/orders/order_message.rb +0 -17
  82. data/examples/orders/order_product.rb +0 -23
  83. data/examples/orders/order_shipping_address.rb +0 -23
  84. data/examples/orders/order_status.rb +0 -15
  85. data/examples/orders/order_tax.rb +0 -17
  86. data/examples/orders/shipment.rb +0 -57
  87. data/examples/payments/payment_method.rb +0 -10
  88. data/examples/products/brand.rb +0 -36
  89. data/examples/products/bulk_pricing_rule.rb +0 -47
  90. data/examples/products/category.rb +0 -37
  91. data/examples/products/configurable_field.rb +0 -29
  92. data/examples/products/custom_field.rb +0 -44
  93. data/examples/products/google_product_search_mapping.rb +0 -12
  94. data/examples/products/option.rb +0 -37
  95. data/examples/products/option_set.rb +0 -35
  96. data/examples/products/option_set_option.rb +0 -50
  97. data/examples/products/option_value.rb +0 -43
  98. data/examples/products/product.rb +0 -44
  99. data/examples/products/product_image.rb +0 -42
  100. data/examples/products/product_option.rb +0 -17
  101. data/examples/products/product_review.rb +0 -12
  102. data/examples/products/product_rule.rb +0 -54
  103. data/examples/products/product_video.rb +0 -45
  104. data/examples/products/sku.rb +0 -48
  105. data/examples/shipping/shipping_method.rb +0 -13
  106. data/examples/store/store_info.rb +0 -10
  107. data/examples/system/time.rb +0 -10
  108. data/examples/tax/tax_class.rb +0 -13
  109. data/examples/webhooks/webhook.rb +0 -29
  110. data/spec/bigcommerce/bigcommerce_spec.rb +0 -76
  111. data/spec/bigcommerce/unit/actions_spec.rb +0 -151
  112. data/spec/bigcommerce/unit/exception_spec.rb +0 -53
  113. data/spec/bigcommerce/unit/middleware/auth_spec.rb +0 -18
  114. data/spec/bigcommerce/unit/middleware/http_exception_spec.rb +0 -40
  115. data/spec/bigcommerce/unit/request_spec.rb +0 -180
  116. data/spec/bigcommerce/unit/resources/content/blog_post_spec.rb +0 -12
  117. data/spec/bigcommerce/unit/resources/content/blog_tag_spec.rb +0 -12
  118. data/spec/bigcommerce/unit/resources/content/redirect_spec.rb +0 -12
  119. data/spec/bigcommerce/unit/resources/customers/customer_address_spec.rb +0 -21
  120. data/spec/bigcommerce/unit/resources/customers/customer_group_spec.rb +0 -12
  121. data/spec/bigcommerce/unit/resources/customers/customer_spec.rb +0 -12
  122. data/spec/bigcommerce/unit/resources/geography/country_spec.rb +0 -12
  123. data/spec/bigcommerce/unit/resources/geography/state_spec.rb +0 -21
  124. data/spec/bigcommerce/unit/resources/marketing/coupon_spec.rb +0 -12
  125. data/spec/bigcommerce/unit/resources/orders/order_product_spec.rb +0 -21
  126. data/spec/bigcommerce/unit/resources/orders/order_shipping_address_spec.rb +0 -21
  127. data/spec/bigcommerce/unit/resources/orders/order_spec.rb +0 -13
  128. data/spec/bigcommerce/unit/resources/orders/shipment_spec.rb +0 -21
  129. data/spec/bigcommerce/unit/resources/payments/payment_method_spec.rb +0 -23
  130. data/spec/bigcommerce/unit/resources/products/brand_spec.rb +0 -12
  131. data/spec/bigcommerce/unit/resources/products/bulk_pricing_rule_spec.rb +0 -21
  132. data/spec/bigcommerce/unit/resources/products/category_spec.rb +0 -12
  133. data/spec/bigcommerce/unit/resources/products/configurable_field_spec.rb +0 -21
  134. data/spec/bigcommerce/unit/resources/products/custom_field_spec.rb +0 -21
  135. data/spec/bigcommerce/unit/resources/products/google_product_search_mapping_spec.rb +0 -14
  136. data/spec/bigcommerce/unit/resources/products/option_set_spec.rb +0 -12
  137. data/spec/bigcommerce/unit/resources/products/option_spec.rb +0 -12
  138. data/spec/bigcommerce/unit/resources/products/product_image_spec.rb +0 -21
  139. data/spec/bigcommerce/unit/resources/products/product_review_spec.rb +0 -14
  140. data/spec/bigcommerce/unit/resources/products/product_rule_spec.rb +0 -21
  141. data/spec/bigcommerce/unit/resources/products/product_spec.rb +0 -13
  142. data/spec/bigcommerce/unit/resources/products/product_video_spec.rb +0 -21
  143. data/spec/bigcommerce/unit/resources/products/sku_spec.rb +0 -21
  144. data/spec/bigcommerce/unit/resources/resource_spec.rb +0 -4
  145. data/spec/bigcommerce/unit/resources/store_info/store_information_spec.rb +0 -12
  146. data/spec/bigcommerce/unit/resources/system/time_spec.rb +0 -12
  147. data/spec/bigcommerce/unit/version_spec.rb +0 -7
  148. data/spec/spec_helper.rb +0 -11
@@ -24,27 +24,27 @@ module Bigcommerce
24
24
  get path.build, params
25
25
  end
26
26
 
27
- def find(resource_id)
28
- fail ArgumentError if resource_id.nil?
29
- get path.build(resource_id)
27
+ def find(resource_id, params = {})
28
+ raise ArgumentError if resource_id.nil?
29
+ get path.build(resource_id), params
30
30
  end
31
31
 
32
- def create(params)
32
+ def create(params = {})
33
33
  post path.build, params
34
34
  end
35
35
 
36
- def update(resource_id, params)
37
- fail ArgumentError if resource_id.nil?
36
+ def update(resource_id, params = {})
37
+ raise ArgumentError if resource_id.nil?
38
38
  put path.build(resource_id), params
39
39
  end
40
40
 
41
- def destroy(resource_id)
42
- fail ArgumentError if resource_id.nil?
43
- delete path.build(resource_id)
41
+ def destroy(resource_id, params = {})
42
+ raise ArgumentError if resource_id.nil?
43
+ delete path.build(resource_id), params
44
44
  end
45
45
 
46
- def destroy_all
47
- delete path.build
46
+ def destroy_all(params = {})
47
+ delete path.build, params
48
48
  end
49
49
  end
50
50
  end
@@ -8,24 +8,22 @@ module Bigcommerce
8
8
 
9
9
  property :id
10
10
  property :url
11
- property :count
12
11
  property :preview_url
13
12
  property :body
14
13
  property :tags
15
14
  property :summary
16
15
  property :title
17
- property :content
18
16
  property :author
19
17
  property :author_url
20
18
  property :is_published
21
19
  property :published_date
22
- property :published_at
23
20
  property :meta_description
24
21
  property :meta_keywords
25
22
  property :thumbnail_path
23
+ property :count
26
24
 
27
- def self.count
28
- get 'blog/posts/count'
25
+ def self.count(params = {})
26
+ get 'blog/posts/count', params
29
27
  end
30
28
  end
31
29
  end
@@ -6,12 +6,11 @@ module Bigcommerce
6
6
  class BlogTag < Resource
7
7
  include Bigcommerce::Request.new 'blog/tags'
8
8
 
9
- property :id
10
9
  property :tag
11
10
  property :post_ids
12
11
 
13
- def self.all
14
- get path.build
12
+ def self.all(params = {})
13
+ get path.build, params
15
14
  end
16
15
  end
17
16
  end
@@ -14,8 +14,8 @@ module Bigcommerce
14
14
  property :forward
15
15
  property :url
16
16
 
17
- def self.count
18
- get 'redirects/count'
17
+ def self.count(params = {})
18
+ get 'redirects/count', params
19
19
  end
20
20
  end
21
21
  end
@@ -1,3 +1,6 @@
1
+ require 'jwt'
2
+ require 'securerandom'
3
+
1
4
  # Customer
2
5
  # Identity and account details for customers shopping at a Bigcommerce store.
3
6
  # https://developer.bigcommerce.com/api/stores/v2/customers
@@ -22,9 +25,26 @@ module Bigcommerce
22
25
  property :notes
23
26
  property :addresses
24
27
  property :tax_exempt_category
28
+ property :accepts_marketing
29
+
30
+ def self.count(params = {})
31
+ get 'customers/count', params
32
+ end
33
+
34
+ # Generate a token that can be used to log the customer into the storefront.
35
+ # This requires your app to have the store_v2_customers_login scope and to
36
+ # be installed in the store.
37
+ def login_token(config: Bigcommerce.config)
38
+ payload = {
39
+ 'iss' => config.client_id,
40
+ 'iat' => Time.now.to_i,
41
+ 'jti' => SecureRandom.uuid,
42
+ 'operation' => 'customer_login',
43
+ 'store_hash' => config.store_hash,
44
+ 'customer_id' => id
45
+ }
25
46
 
26
- def self.count
27
- get 'customers/count'
47
+ JWT.encode(payload, config.client_secret, 'HS256')
28
48
  end
29
49
  end
30
50
  end
@@ -8,6 +8,7 @@ module Bigcommerce
8
8
 
9
9
  property :id
10
10
  property :customer_id
11
+ property :form_fields
11
12
  property :first_name
12
13
  property :address_type
13
14
  property :count
@@ -21,14 +22,13 @@ module Bigcommerce
21
22
  property :country
22
23
  property :country_iso2
23
24
  property :phone
24
- property :adderss_type
25
25
 
26
- def self.count_all
27
- get 'customers/addresses/count'
26
+ def self.count_all(params = {})
27
+ get 'customers/addresses/count', params
28
28
  end
29
29
 
30
- def self.count(customer_id)
31
- get "customers/#{customer_id}/addresses/count"
30
+ def self.count(customer_id, params = {})
31
+ get "customers/#{customer_id}/addresses/count", params
32
32
  end
33
33
  end
34
34
  end
@@ -14,8 +14,8 @@ module Bigcommerce
14
14
  property :category_access
15
15
  property :discount_rules
16
16
 
17
- def self.count
18
- get 'customer_groups/count'
17
+ def self.count(params = {})
18
+ get 'customer_groups/count', params
19
19
  end
20
20
  end
21
21
  end
@@ -6,7 +6,8 @@ module Bigcommerce
6
6
  class Country < Resource
7
7
  include Bigcommerce::ResourceActions.new(
8
8
  uri: 'countries/%d',
9
- disable: [:create, :update, :destroy, :destroy_all])
9
+ disable: %i[create update destroy destroy_all]
10
+ )
10
11
 
11
12
  property :id
12
13
  property :count
@@ -15,8 +16,8 @@ module Bigcommerce
15
16
  property :country_iso3
16
17
  property :states
17
18
 
18
- def self.count
19
- get 'countries/count'
19
+ def self.count(params = {})
20
+ get 'countries/count', params
20
21
  end
21
22
  end
22
23
  end
@@ -6,7 +6,8 @@ module Bigcommerce
6
6
  class State < Resource
7
7
  include Bigcommerce::SubresourceActions.new(
8
8
  uri: 'countries/%d/states/%d',
9
- disable: [:create, :update, :destroy, :destroy_all])
9
+ disable: %i[create update destroy destroy_all]
10
+ )
10
11
 
11
12
  property :id
12
13
  property :count
@@ -14,12 +15,12 @@ module Bigcommerce
14
15
  property :state_abbreviation
15
16
  property :country_id
16
17
 
17
- def self.count(country_id)
18
- get "countries/#{country_id}/states/count"
18
+ def self.count(country_id, params = {})
19
+ get "countries/#{country_id}/states/count", params
19
20
  end
20
21
 
21
- def self.count_all
22
- get 'countries/states/count'
22
+ def self.count_all(params = {})
23
+ get 'countries/states/count', params
23
24
  end
24
25
  end
25
26
  end
@@ -0,0 +1,21 @@
1
+ # Banner
2
+ # HTML element on webpages to advertise discounts or other content relevant to shoppers.
3
+ # https://developer.bigcommerce.com/api/stores/v2/banners
4
+
5
+ module Bigcommerce
6
+ class Banner < Resource
7
+ include Bigcommerce::ResourceActions.new uri: 'banners/%d'
8
+
9
+ property :id
10
+ property :name
11
+ property :content
12
+ property :page
13
+ property :catorbrandid
14
+ property :location
15
+ property :date_created
16
+ property :date_type
17
+ property :date_from
18
+ property :date_to
19
+ property :status
20
+ end
21
+ end
@@ -23,8 +23,8 @@ module Bigcommerce
23
23
  property :restricted_to
24
24
  property :shipping_methods
25
25
 
26
- def self.count
27
- get 'coupons/count'
26
+ def self.count(params = {})
27
+ get 'coupons/count', params
28
28
  end
29
29
  end
30
30
  end
@@ -0,0 +1,25 @@
1
+ # Gift Certificates
2
+ # Code that can be applied by customers to their order to provide full or partial payment.
3
+ # https://developer.bigcommerce.com/api/stores/v2/gift_certificates
4
+
5
+ module Bigcommerce
6
+ class GiftCertificates < Resource
7
+ include Bigcommerce::ResourceActions.new uri: 'gift_certificates/%d'
8
+
9
+ property :id
10
+ property :customer_id
11
+ property :order_id
12
+ property :code
13
+ property :to_name
14
+ property :to_email
15
+ property :from_name
16
+ property :from_email
17
+ property :amount
18
+ property :balance
19
+ property :status
20
+ property :template
21
+ property :message
22
+ property :purchase_date
23
+ property :expiry_date
24
+ end
25
+ end
@@ -7,64 +7,66 @@ module Bigcommerce
7
7
  include Bigcommerce::ResourceActions.new uri: 'orders/%d'
8
8
 
9
9
  property :id
10
- property :count
10
+ property :status
11
+ property :coupons
12
+ property :products
13
+ property :status_id
14
+ property :total_tax
15
+ property :ip_address
16
+ property :is_deleted
17
+ property :currency_id
11
18
  property :customer_id
19
+ property :items_total
20
+ property :staff_notes
12
21
  property :date_created
13
- property :date_modified
14
22
  property :date_shipped
15
- property :status_id
16
- property :status
17
- property :subtotal_ex_tax
18
- property :subtotal_inc_tax
23
+ property :order_source
19
24
  property :subtotal_tax
20
- property :base_shipping_cost
21
- property :shipping_cost_ex_tax
22
- property :shipping_cost_inc_tax
23
- property :shipping_cost_tax
24
- property :shipping_cost_tax_class_id
25
- property :base_handling_cost
26
- property :handling_cost_ex_tax
27
- property :handling_cost_inc_tax
28
- property :handling_cost_tax
29
- property :handling_cost_tax_class_id
30
- property :base_wrapping_cost
31
- property :wrapping_cost_ex_tax
32
- property :wrapping_cost_inc_tax
33
- property :wrapping_cost_tax
34
- property :wrapping_cost_tax_class_id
35
25
  property :total_ex_tax
36
- property :total_inc_tax
37
- property :total_tax
38
- property :items_total
26
+ property :currency_code
27
+ property :date_modified
28
+ property :ebay_order_id
29
+ property :geoip_country
39
30
  property :items_shipped
31
+ property :total_inc_tax
40
32
  property :payment_method
41
- property :payment_provider_id
42
33
  property :payment_status
34
+ property :billing_address
35
+ property :coupon_discount
36
+ property :discount_amount
37
+ property :external_source
38
+ property :is_email_opt_in
43
39
  property :refunded_amount
40
+ property :subtotal_ex_tax
41
+ property :credit_card_type
42
+ property :customer_message
44
43
  property :order_is_digital
45
- property :store_credit_amount
46
- property :gift_certificate_amount
47
- property :ip_address
48
- property :geoip_country
44
+ property :subtotal_inc_tax
45
+ property :handling_cost_tax
46
+ property :shipping_cost_tax
47
+ property :wrapping_cost_tax
48
+ property :base_handling_cost
49
+ property :base_shipping_cost
50
+ property :base_wrapping_cost
49
51
  property :geoip_country_iso2
50
- property :currency_id
51
- property :currency_code
52
- property :currency_exchange_rate
52
+ property :shipping_addresses
53
53
  property :default_currency_id
54
+ property :payment_provider_id
55
+ property :store_credit_amount
56
+ property :handling_cost_ex_tax
57
+ property :shipping_cost_ex_tax
58
+ property :wrapping_cost_ex_tax
54
59
  property :default_currency_code
55
- property :staff_notes
56
- property :customer_message
57
- property :discount_amount
58
- property :coupon_discount
60
+ property :handling_cost_inc_tax
61
+ property :shipping_cost_inc_tax
62
+ property :wrapping_cost_inc_tax
63
+ property :currency_exchange_rate
59
64
  property :shipping_address_count
60
- property :is_deleted
61
- property :ebay_order_id
62
- property :billing_address
63
- property :order_source
64
- property :external_source
65
- property :products
66
- property :shipping_addresses
67
- property :coupons
65
+ property :gift_certificate_amount
66
+ property :handling_cost_tax_class_id
67
+ property :shipping_cost_tax_class_id
68
+ property :wrapping_cost_tax_class_id
69
+ property :count
68
70
 
69
71
  def self.count(params = {})
70
72
  get 'orders/count', params
@@ -6,15 +6,15 @@ module Bigcommerce
6
6
  class OrderCoupon < Resource
7
7
  include Bigcommerce::SubresourceActions.new(
8
8
  uri: 'orders/%d/coupons/%d',
9
- disable: [:create, :update, :destroy, :destroy_all])
9
+ disable: %i[create update destroy destroy_all]
10
+ )
10
11
 
11
12
  property :id
12
- property :coupon_id
13
- property :order_id
14
13
  property :code
15
- property :amount
16
- property :type
17
14
  property :type
15
+ property :amount
18
16
  property :discount
17
+ property :order_id
18
+ property :coupon_id
19
19
  end
20
20
  end
@@ -6,18 +6,19 @@ module Bigcommerce
6
6
  class OrderMessage < Resource
7
7
  include Bigcommerce::SubresourceActions.new(
8
8
  uri: 'orders/%d/messages/%d',
9
- disable: [:create, :update, :destroy, :destroy_all])
9
+ disable: %i[create update destroy destroy_all]
10
+ )
10
11
 
11
12
  property :id
12
- property :order_id
13
- property :staff_id
14
- property :customer_id
15
13
  property :type
16
- property :subject
17
- property :message
18
14
  property :status
15
+ property :message
16
+ property :subject
17
+ property :customer
18
+ property :order_id
19
+ property :staff_id
19
20
  property :is_flagged
21
+ property :customer_id
20
22
  property :date_created
21
- property :customer
22
23
  end
23
24
  end
@@ -6,59 +6,60 @@ module Bigcommerce
6
6
  class OrderProduct < Resource
7
7
  include Bigcommerce::SubresourceActions.new(
8
8
  uri: 'orders/%d/products/%d',
9
- disable: [:create, :update, :destroy, :destroy_all])
9
+ disable: %i[create update destroy destroy_all]
10
+ )
10
11
 
11
12
  property :id
12
- property :order_id
13
- property :product_id
14
- property :order_address_id
15
- property :name
16
13
  property :sku
14
+ property :name
17
15
  property :type
18
- property :count
19
- property :base_price
20
- property :price_ex_tax
21
- property :price_inc_tax
16
+ property :weight
17
+ property :order_id
18
+ property :quantity
22
19
  property :price_tax
20
+ property :return_id
21
+ property :total_tax
22
+ property :base_price
23
23
  property :base_total
24
+ property :event_date
25
+ property :event_name
26
+ property :product_id
27
+ property :is_refunded
28
+ property :ebay_item_id
29
+ property :price_ex_tax
24
30
  property :total_ex_tax
31
+ property :option_set_id
32
+ property :price_inc_tax
33
+ property :refund_amount
25
34
  property :total_inc_tax
26
- property :total_tax
27
- property :weight
28
- property :quantity
35
+ property :wrapping_name
36
+ property :cost_price_tax
29
37
  property :base_cost_price
30
- property :cost_price_inc_tax
38
+ property :product_options
39
+ property :order_address_id
40
+ property :quantity_shipped
41
+ property :wrapping_message
42
+ property :applied_discounts
31
43
  property :cost_price_ex_tax
32
- property :cost_price_tax
33
- property :is_refunded
34
- property :refund_amount
35
- property :return_id
36
- property :wrapping_name
44
+ property :wrapping_cost_tax
37
45
  property :base_wrapping_cost
46
+ property :bin_picking_number
47
+ property :cost_price_inc_tax
48
+ property :configurable_fields
49
+ property :ebay_transaction_id
50
+ property :fixed_shipping_cost
51
+ property :is_bundled_product
38
52
  property :wrapping_cost_ex_tax
39
53
  property :wrapping_cost_inc_tax
40
- property :wrapping_cost_tax
41
- property :wrapping_message
42
- property :quantity_shipped
43
- property :event_name
44
- property :event_date
45
- property :fixed_shipping_cost
46
- property :ebay_item_id
47
- property :ebay_transaction_id
48
- property :option_set_id
49
54
  property :parent_order_product_id
50
- property :is_bundled_product, from: :'is_bundled_product '
51
- property :bin_picking_number
52
- property :applied_discounts
53
- property :product_options
54
- property :configurable_fields
55
+ property :count
55
56
 
56
- def self.count(order_id)
57
- get "orders/#{order_id}/products/count"
57
+ def self.count(order_id, params = {})
58
+ get "orders/#{order_id}/products/count", params
58
59
  end
59
60
 
60
- def self.count_all
61
- get 'orders/products/count'
61
+ def self.count_all(params = {})
62
+ get 'orders/products/count', params
62
63
  end
63
64
  end
64
65
  end