peddler 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/lib/peddler/apis/fulfillment_inbound_2024_03_20/item.rb +2 -1
  4. data/lib/peddler/apis/fulfillment_outbound_2020_07_01/drop_off_location.rb +2 -0
  5. data/lib/peddler/apis/messaging_v1.rb +0 -20
  6. data/lib/peddler/apis/orders_v0/order_item.rb +0 -3
  7. data/lib/peddler/apis/orders_v0.rb +0 -12
  8. data/lib/peddler/apis/product_pricing_v0/get_offers_result.rb +3 -3
  9. data/lib/peddler/apis/vendor_shipments_v1.rb +0 -12
  10. data/lib/peddler/data_kiosk/sales_and_traffic20240424/by_asin_sales.rb +21 -0
  11. data/lib/peddler/data_kiosk/sales_and_traffic20240424/by_date_sales.rb +12 -0
  12. data/lib/peddler/data_kiosk/sales_and_traffic20240424.json +120 -0
  13. data/lib/peddler/notifications/b2b_any_offer_changed/b2b_any_offer_changed_notification.rb +6 -6
  14. data/lib/peddler/notifications/b2b_any_offer_changed/buy_box_price.rb +12 -9
  15. data/lib/peddler/notifications/b2b_any_offer_changed/lowest_price.rb +11 -8
  16. data/lib/peddler/notifications/b2b_any_offer_changed/notification.rb +10 -13
  17. data/lib/peddler/notifications/b2b_any_offer_changed/notification_metadata.rb +8 -8
  18. data/lib/peddler/notifications/b2b_any_offer_changed/offer.rb +25 -23
  19. data/lib/peddler/notifications/b2b_any_offer_changed/offer_change_trigger.rb +9 -9
  20. data/lib/peddler/notifications/b2b_any_offer_changed/offer_count.rb +4 -4
  21. data/lib/peddler/notifications/b2b_any_offer_changed/payload.rb +2 -2
  22. data/lib/peddler/notifications/b2b_any_offer_changed/points.rb +16 -0
  23. data/lib/peddler/notifications/b2b_any_offer_changed/prime_information.rb +4 -4
  24. data/lib/peddler/notifications/b2b_any_offer_changed/quantity_discount_price_type.rb +3 -3
  25. data/lib/peddler/notifications/b2b_any_offer_changed/seller_feedback_rating.rb +4 -4
  26. data/lib/peddler/notifications/b2b_any_offer_changed/shipping_time.rb +9 -9
  27. data/lib/peddler/notifications/b2b_any_offer_changed/ships_from.rb +4 -1
  28. data/lib/peddler/notifications/b2b_any_offer_changed/summary.rb +8 -8
  29. data/lib/peddler/version.rb +1 -1
  30. data/sig/peddler/apis/messaging_v1.rbs +0 -34
  31. data/sig/peddler/apis/orders_v0.rbs +7 -151
  32. data/sig/peddler/apis/product_pricing_v0.rbs +7 -7
  33. data/sig/peddler/apis/vendor_shipments_v1.rbs +0 -85
  34. data/sig/peddler/data_kiosk/sales_and_traffic20240424.rbs +23 -14
  35. data/sig/peddler/notifications/b2b_any_offer_changed.rbs +58 -38
  36. metadata +2 -16
  37. data/lib/peddler/apis/messaging_v1/create_amazon_motors_request.rb +0 -19
  38. data/lib/peddler/apis/messaging_v1/create_amazon_motors_response.rb +0 -17
  39. data/lib/peddler/apis/orders_v0/export_info.rb +0 -23
  40. data/lib/peddler/apis/orders_v0/fulfillment_instructions.rb +0 -20
  41. data/lib/peddler/apis/orders_v0/fulfillment_location.rb +0 -17
  42. data/lib/peddler/apis/orders_v0/fulfillment_plan.rb +0 -41
  43. data/lib/peddler/apis/orders_v0/fulfillment_plan_item.rb +0 -20
  44. data/lib/peddler/apis/orders_v0/fulfillment_plan_shipping_constraints.rb +0 -20
  45. data/lib/peddler/apis/orders_v0/get_order_fulfillment_instructions_response.rb +0 -21
  46. data/lib/peddler/apis/orders_v0/shipping_instructions.rb +0 -23
  47. data/lib/peddler/apis/vendor_shipments_v1/packed_quantity.rb +0 -25
  48. data/lib/peddler/apis/vendor_shipments_v1/purchase_order_item_details.rb +0 -18
  49. data/lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmation_request.rb +0 -17
  50. data/lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmation_response.rb +0 -20
  51. data/lib/peddler/apis/vendor_shipments_v1/submit_shipment_confirmation_result.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e044749a9fe4a33798eafa2500ddeeb5f98e89a2c50deaff3edbc94a2fa1228d
4
- data.tar.gz: d0c258dfc38b440abfe2e37eecf57449b7c5b27c24d16fc9b2ff35d3c9e3904f
3
+ metadata.gz: d1a102faf0882823939b67d377693a0baea754d275d3156e8101e062fa87ea40
4
+ data.tar.gz: b4fc2b45b9379c183cb750f6f9ce57758806d4ad7c824f1a3bc2d852d57ca5b4
5
5
  SHA512:
6
- metadata.gz: e7e061d9e1ecb068b9e7a84e0e728ccc0288152fc358f1bd8b19c69cfd85698870110f793f348eb9122e6ed2c93be6bf8f499fa73c1acb7b7e3628e82ef32ade
7
- data.tar.gz: 2b3782bb19640b32803bb767cc89841215a37cf1f31fff83f30be162ec853d89de3708b9ebc759fba80d3c672e1b3a60dd6c8c489133e4079392aa8ea2f32711
6
+ metadata.gz: 67c475da96e1defb5d9fe1255289676163170fccf95233dff3056dc8615014d8e53d67f11e7ff67330e532650c352c330629c5d149c972aee4ab33197ea6ae23
7
+ data.tar.gz: 767cae5456e72237225ea44f273e1060d2044412517b8cb44a53811e28e851f37f9c8f221fd419229927210762a9fa6060decdb442f3636432ca0039dc226641
data/README.md CHANGED
@@ -6,6 +6,8 @@ Peddler is a Ruby interface to the [Amazon Selling Partner API (SP-API)][api-doc
6
6
 
7
7
  Peddler is automatically generated from the latest Open API models provided by Amazon.
8
8
 
9
+ Peddler covers all SP-API endpoints, reports, notifications, and feeds. It's also lightweight: thanks to Zeitwerk, only the code you use gets loaded.
10
+
9
11
  To begin using the Amazon SP-API, you must [register as a developer][register-as-developer] and [register your application][register-application]. Once registered, [obtain your Login with Amazon (LWA) credentials][view-credentials] to access your own or other selling partners' data.
10
12
 
11
13
  - [API docs][api-docs]
@@ -307,9 +309,6 @@ bundle exec rake generate
307
309
  # Type check with Steep
308
310
  bundle exec steep check --severity-level=hint
309
311
  ```
310
-
311
- > AI Agents: See [llms.txt](llms.txt)
312
-
313
312
  [build]: https://github.com/lineofflight/peddler/actions
314
313
  [api-docs]: https://developer.amazonservices.com/sp-api-docs/overview
315
314
  [register-as-developer]: https://developer-docs.amazon.com/sp-api/docs/registering-as-a-developer
@@ -16,7 +16,8 @@ module Peddler
16
16
  # fulfillment center.
17
17
  attribute(:fnsku, String)
18
18
 
19
- # @return [String] Specifies who will label the items. Options include `AMAZON`, `SELLER`, and `NONE`.
19
+ # @return [String] Specifies who will label the items. Options include `AMAZON`, `SELLER`, and `NONE`. `AMAZON`
20
+ # is not an accepted value in the US marketplace.
20
21
  attribute(:label_owner, String, from: "labelOwner")
21
22
 
22
23
  # @return [String] The merchant-defined SKU ID.
@@ -16,6 +16,8 @@ module Peddler
16
16
  # drop-off location specified in the `type` field.
17
17
  # If the `type` is set to `FALLBACK_NEIGHBOR_DELIVERY`, the `attributes` object should include the exact keys
18
18
  # `neighborName` and `houseNumber` to provide the name and house number of the designated neighbor.
19
+ # For `RECEPTIONIST`, `MAIL_ROOM_CLERK`, and `AS_INSTRUCTED` types, the `attributes` object will include a
20
+ # `recipientName` field containing the name of the person who received the package.
19
21
  attribute?(:attributes, Hash)
20
22
  end
21
23
  end
@@ -131,26 +131,6 @@ module Peddler
131
131
  post(path, body:, params:, rate_limit:, parser:)
132
132
  end
133
133
 
134
- # Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by
135
- # Amazon Motors sellers.
136
- #
137
- # @note This operation can make a static sandbox call.
138
- # @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
139
- # sent.
140
- # @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
141
- # order was placed. You can only specify one marketplace.
142
- # @param body [Hash] This contains the message body for a message.
143
- # @param rate_limit [Float] Requests per second
144
- # @return [Peddler::Response] The API response
145
- def create_amazon_motors(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
146
- path = "/messaging/v1/orders/#{percent_encode(amazon_order_id)}/messages/amazonMotors"
147
- params = {
148
- "marketplaceIds" => stringify_array(marketplace_ids),
149
- }.compact
150
- parser = -> { CreateAmazonMotorsResponse }
151
- post(path, body:, params:, rate_limit:, parser:)
152
- end
153
-
154
134
  # Sends a message to a buyer to provide details about warranty information on a purchase in their order.
155
135
  #
156
136
  # @note This operation can make a static sandbox call.
@@ -59,9 +59,6 @@ module Peddler
59
59
  # EU and is used to help them meet the VAT Deemed Reseller tax laws in the EU and UK.
60
60
  attribute?(:deemed_reseller_category, String, from: "DeemedResellerCategory")
61
61
 
62
- # @return [ExportInfo] Contains information that is related to the export of an order item.
63
- attribute?(:export_info, ExportInfo, from: "ExportInfo")
64
-
65
62
  # @return [String] The IOSS number of the marketplace. Sellers shipping to the EU from outside the EU must
66
63
  # provide this IOSS number to their carrier when Amazon has collected the VAT on the sale.
67
64
  attribute?(:ioss_number, String, from: "IossNumber")
@@ -178,18 +178,6 @@ module Peddler
178
178
  get(path, rate_limit:, parser:)
179
179
  end
180
180
 
181
- # Returns the fulfillment instructions for the order that you specify.
182
- #
183
- # @note This operation can make a static sandbox call.
184
- # @param order_id [String] The Amazon order identifier in 3-7-7 format.
185
- # @param rate_limit [Float] Requests per second
186
- # @return [Peddler::Response] The API response
187
- def get_order_fulfillment_instructions(order_id, rate_limit: 0.5)
188
- path = "/orders/v0/orders/#{percent_encode(order_id)}/fulfillmentInstructions"
189
- parser = -> { GetOrderFulfillmentInstructionsResponse }
190
- get(path, rate_limit:, parser:)
191
- end
192
-
193
181
  # Returns detailed order item information for the order that you specify. If `NextToken` is provided, it's used to
194
182
  # retrieve the next page of order items.
195
183
  #
@@ -15,9 +15,6 @@ module Peddler
15
15
  # @return [String] The condition of the item.
16
16
  attribute(:item_condition, String, from: "ItemCondition")
17
17
 
18
- # @return [String] A marketplace identifier.
19
- attribute(:marketplace_id, String, from: "MarketplaceID")
20
-
21
18
  # @return [Array<OfferDetail>] A list of offer details. The list is the same length as the TotalOfferCount in
22
19
  # the Summary or 20, whichever is less.
23
20
  attribute(:offers, [OfferDetail], from: "Offers")
@@ -25,6 +22,9 @@ module Peddler
25
22
  # @return [Summary] Pricing information about the item.
26
23
  attribute(:summary, Summary, from: "Summary")
27
24
 
25
+ # @return [String] A marketplace identifier.
26
+ attribute(:marketplace_id, String, from: "marketplaceId")
27
+
28
28
  # @return [String] The status of the operation.
29
29
  attribute(:status, String)
30
30
 
@@ -23,18 +23,6 @@ module Peddler
23
23
  post(path, body:, rate_limit:, parser:)
24
24
  end
25
25
 
26
- # Submits one shipment confirmation for vendor orders and get response immediately.
27
- #
28
- # @note This operation can make a static sandbox call.
29
- # @param body [Hash] A request to submit shipment confirmation.
30
- # @param rate_limit [Float] Requests per second
31
- # @return [Peddler::Response] The API response
32
- def submit_shipment_confirmation(body, rate_limit: 10.0)
33
- path = "/vendor/shipping/v1/shipmentConfirmation"
34
- parser = -> { SubmitShipmentConfirmationResponse }
35
- post(path, body:, rate_limit:, parser:)
36
- end
37
-
38
26
  # Submits one or more shipment request for vendor Orders.
39
27
  #
40
28
  # @param body [Hash] A request to submit shipment request.
@@ -18,6 +18,13 @@ module Peddler
18
18
  # populated when the seller is a B2B seller.
19
19
  attribute?(:ordered_product_sales_b2b, Amount, from: "orderedProductSalesB2B")
20
20
 
21
+ # @return [String] The number of orders shipped for the selected time period.
22
+ attribute?(:orders_shipped, String, null: false, from: "ordersShipped")
23
+
24
+ # @return [String] The number of orders shipped to Amazon Business customers for the selected time period. Note:
25
+ # This field is only populated when the seller is a B2B seller.
26
+ attribute?(:orders_shipped_b2b, String, from: "ordersShippedB2B")
27
+
21
28
  # @return [Float] The percentage conversion metric indicating how many orders were refunded, calculated by
22
29
  # dividing unitsRefunded by unitsOrdered for the selected time period.
23
30
  attribute?(:refund_rate, Float, null: false, from: "refundRate")
@@ -27,6 +34,13 @@ module Peddler
27
34
  # This field is only populated when the seller is a B2B seller.
28
35
  attribute?(:refund_rate_b2b, Float, from: "refundRateB2B")
29
36
 
37
+ # @return [Amount] The amount of ordered product sales shipped for the selected time period.
38
+ attribute?(:shipped_product_sales, Amount, null: false, from: "shippedProductSales")
39
+
40
+ # @return [Amount] The amount of ordered product sales shipped to Amazon Business customers for the selected
41
+ # time period. Note: This field is only populated when the seller is a B2B seller.
42
+ attribute?(:shipped_product_sales_b2b, Amount, from: "shippedProductSalesB2B")
43
+
30
44
  # @return [String] The number of items that were ordered for the selected time period.
31
45
  attribute?(:total_order_items, String, null: false, from: "totalOrderItems")
32
46
 
@@ -47,6 +61,13 @@ module Peddler
47
61
  # @return [String] The number of units refunded by Amazon Business customers for the selected time period. Note:
48
62
  # This field is only populated when the seller is a B2B seller.
49
63
  attribute?(:units_refunded_b2b, String, from: "unitsRefundedB2B")
64
+
65
+ # @return [String] The number of units shipped for the selected time period.
66
+ attribute?(:units_shipped, String, null: false, from: "unitsShipped")
67
+
68
+ # @return [String] The number of units shipped to Amazon Business customers for the selected time period. Note:
69
+ # This field is only populated when the seller is a B2B seller.
70
+ attribute?(:units_shipped_b2b, String, from: "unitsShippedB2B")
50
71
  end
51
72
  end
52
73
  end
@@ -60,6 +60,10 @@ module Peddler
60
60
  # @return [String] The number of orders shipped for the selected time period.
61
61
  attribute?(:orders_shipped, String, null: false, from: "ordersShipped")
62
62
 
63
+ # @return [String] The number of orders shipped to Amazon Business customers for the selected time period. Note:
64
+ # This field is only populated when the seller is a B2B seller.
65
+ attribute?(:orders_shipped_b2b, String, from: "ordersShippedB2B")
66
+
63
67
  # @return [Float] The percentage conversion metric indicating how many orders were refunded by the seller,
64
68
  # calculated by dividing unitsRefunded by unitsOrdered for the selected time period.
65
69
  attribute?(:refund_rate, Float, null: false, from: "refundRate")
@@ -72,6 +76,10 @@ module Peddler
72
76
  # @return [Amount] The amount of ordered product sales shipped for the selected time period.
73
77
  attribute?(:shipped_product_sales, Amount, null: false, from: "shippedProductSales")
74
78
 
79
+ # @return [Amount] The amount of ordered product sales shipped to Amazon Business customers for the selected
80
+ # time period. Note: This field is only populated when the seller is a B2B seller.
81
+ attribute?(:shipped_product_sales_b2b, Amount, from: "shippedProductSalesB2B")
82
+
75
83
  # @return [String] The number of items that were ordered for the selected time period. Example:
76
84
  # For an order containing 2 copies of book A and 3 copies of book B, the number of orders is 1, the number of
77
85
  # order items is 2 (book A and book B), and the number of units is 5 (2 + 3).
@@ -103,6 +111,10 @@ module Peddler
103
111
 
104
112
  # @return [String] The number of units shipped for the selected time period.
105
113
  attribute?(:units_shipped, String, null: false, from: "unitsShipped")
114
+
115
+ # @return [String] The number of units shipped to Amazon Business customers for the selected time period. Note:
116
+ # This field is only populated when the seller is a B2B seller.
117
+ attribute?(:units_shipped_b2b, String, from: "unitsShippedB2B")
106
118
  end
107
119
  end
108
120
  end
@@ -390,6 +390,34 @@
390
390
  "isDeprecated": false,
391
391
  "deprecationReason": null
392
392
  },
393
+ {
394
+ "name": "ordersShipped",
395
+ "description": "The number of orders shipped for the selected time period.",
396
+ "args": [],
397
+ "type": {
398
+ "kind": "NON_NULL",
399
+ "name": null,
400
+ "ofType": {
401
+ "kind": "SCALAR",
402
+ "name": "Long",
403
+ "ofType": null
404
+ }
405
+ },
406
+ "isDeprecated": false,
407
+ "deprecationReason": null
408
+ },
409
+ {
410
+ "name": "ordersShippedB2B",
411
+ "description": "The number of orders shipped to Amazon Business customers for the selected\ntime period. Note: This field is only populated when the seller is a B2B seller.",
412
+ "args": [],
413
+ "type": {
414
+ "kind": "SCALAR",
415
+ "name": "Long",
416
+ "ofType": null
417
+ },
418
+ "isDeprecated": false,
419
+ "deprecationReason": null
420
+ },
393
421
  {
394
422
  "name": "refundRate",
395
423
  "description": "The percentage conversion metric indicating how many orders were refunded,\ncalculated by dividing unitsRefunded by unitsOrdered for the selected time period.",
@@ -418,6 +446,34 @@
418
446
  "isDeprecated": false,
419
447
  "deprecationReason": null
420
448
  },
449
+ {
450
+ "name": "shippedProductSales",
451
+ "description": "The amount of ordered product sales shipped for the selected time period.",
452
+ "args": [],
453
+ "type": {
454
+ "kind": "NON_NULL",
455
+ "name": null,
456
+ "ofType": {
457
+ "kind": "OBJECT",
458
+ "name": "Amount",
459
+ "ofType": null
460
+ }
461
+ },
462
+ "isDeprecated": false,
463
+ "deprecationReason": null
464
+ },
465
+ {
466
+ "name": "shippedProductSalesB2B",
467
+ "description": "The amount of ordered product sales shipped to Amazon Business customers for\nthe selected time period. Note: This field is only populated when the seller\nis a B2B seller.",
468
+ "args": [],
469
+ "type": {
470
+ "kind": "OBJECT",
471
+ "name": "Amount",
472
+ "ofType": null
473
+ },
474
+ "isDeprecated": false,
475
+ "deprecationReason": null
476
+ },
421
477
  {
422
478
  "name": "totalOrderItems",
423
479
  "description": "The number of items that were ordered for the selected time period.",
@@ -501,6 +557,34 @@
501
557
  },
502
558
  "isDeprecated": false,
503
559
  "deprecationReason": null
560
+ },
561
+ {
562
+ "name": "unitsShipped",
563
+ "description": "The number of units shipped for the selected time period.",
564
+ "args": [],
565
+ "type": {
566
+ "kind": "NON_NULL",
567
+ "name": null,
568
+ "ofType": {
569
+ "kind": "SCALAR",
570
+ "name": "Long",
571
+ "ofType": null
572
+ }
573
+ },
574
+ "isDeprecated": false,
575
+ "deprecationReason": null
576
+ },
577
+ {
578
+ "name": "unitsShippedB2B",
579
+ "description": "The number of units shipped to Amazon Business customers for the selected time\nperiod. Note: This field is only populated when the seller is a B2B seller.",
580
+ "args": [],
581
+ "type": {
582
+ "kind": "SCALAR",
583
+ "name": "Long",
584
+ "ofType": null
585
+ },
586
+ "isDeprecated": false,
587
+ "deprecationReason": null
504
588
  }
505
589
  ],
506
590
  "inputFields": null,
@@ -1100,6 +1184,18 @@
1100
1184
  "isDeprecated": false,
1101
1185
  "deprecationReason": null
1102
1186
  },
1187
+ {
1188
+ "name": "ordersShippedB2B",
1189
+ "description": "The number of orders shipped to Amazon Business customers for the selected\ntime period. Note: This field is only populated when the seller is a B2B seller.",
1190
+ "args": [],
1191
+ "type": {
1192
+ "kind": "SCALAR",
1193
+ "name": "Long",
1194
+ "ofType": null
1195
+ },
1196
+ "isDeprecated": false,
1197
+ "deprecationReason": null
1198
+ },
1103
1199
  {
1104
1200
  "name": "refundRate",
1105
1201
  "description": "The percentage conversion metric indicating how many orders were refunded by\nthe seller, calculated by dividing unitsRefunded by unitsOrdered for the\nselected time period.",
@@ -1144,6 +1240,18 @@
1144
1240
  "isDeprecated": false,
1145
1241
  "deprecationReason": null
1146
1242
  },
1243
+ {
1244
+ "name": "shippedProductSalesB2B",
1245
+ "description": "The amount of ordered product sales shipped to Amazon Business customers for\nthe selected time period. Note: This field is only populated when the seller\nis a B2B seller.",
1246
+ "args": [],
1247
+ "type": {
1248
+ "kind": "OBJECT",
1249
+ "name": "Amount",
1250
+ "ofType": null
1251
+ },
1252
+ "isDeprecated": false,
1253
+ "deprecationReason": null
1254
+ },
1147
1255
  {
1148
1256
  "name": "totalOrderItems",
1149
1257
  "description": "The number of items that were ordered for the selected time period. Example:\nFor an order containing 2 copies of book A and 3 copies of book B, the number\nof orders is 1, the number of order items is 2 (book A and book B), and the\nnumber of units is 5 (2 + 3).",
@@ -1243,6 +1351,18 @@
1243
1351
  },
1244
1352
  "isDeprecated": false,
1245
1353
  "deprecationReason": null
1354
+ },
1355
+ {
1356
+ "name": "unitsShippedB2B",
1357
+ "description": "The number of units shipped to Amazon Business customers for the selected time\nperiod. Note: This field is only populated when the seller is a B2B seller.",
1358
+ "args": [],
1359
+ "type": {
1360
+ "kind": "SCALAR",
1361
+ "name": "Long",
1362
+ "ofType": null
1363
+ },
1364
+ "isDeprecated": false,
1365
+ "deprecationReason": null
1246
1366
  }
1247
1367
  ],
1248
1368
  "inputFields": null,
@@ -9,17 +9,17 @@ module Peddler
9
9
  module B2BAnyOfferChanged
10
10
  B2BAnyOfferChangedNotification = Structure.new do
11
11
  # @return [OfferChangeTrigger]
12
- attribute(:offer_change_trigger, OfferChangeTrigger, from: "offerChangeTrigger")
12
+ attribute(:offer_change_trigger, OfferChangeTrigger, from: "OfferChangeTrigger")
13
13
 
14
14
  # @return [Array<Offer>] The top 20 competitive B2B offers for the item and condition that triggered the
15
- # notification.
16
- attribute(:offers, [Offer])
15
+ # notification
16
+ attribute(:offers, [Offer], from: "Offers")
17
17
 
18
- # @return [String] The seller identifier for the offer.
19
- attribute(:seller_id, String, from: "sellerId")
18
+ # @return [String] The seller identifier for the offer
19
+ attribute(:seller_id, String, from: "SellerId")
20
20
 
21
21
  # @return [Summary]
22
- attribute(:summary, Summary)
22
+ attribute(:summary, Summary, from: "Summary")
23
23
  end
24
24
  end
25
25
  end
@@ -9,28 +9,31 @@ module Peddler
9
9
  module B2BAnyOfferChanged
10
10
  BuyBoxPrice = Structure.new do
11
11
  # @return [String]
12
- attribute(:condition, String)
12
+ attribute(:condition, String, from: "Condition")
13
13
 
14
14
  # @return [Money]
15
- attribute(:listing_price, Money, from: "listingPrice")
15
+ attribute(:listing_price, Money, from: "ListingPrice")
16
16
 
17
17
  # @return [String]
18
- attribute(:offer_type, String, from: "offerType")
18
+ attribute(:offer_type, String, from: "OfferType")
19
19
 
20
20
  # @return [String]
21
- attribute(:quantity_tier, String, from: "quantityTier")
21
+ attribute(:quantity_tier, String, from: "QuantityTier")
22
22
 
23
23
  # @return [String]
24
- attribute?(:discount_type, String, from: "discountType")
24
+ attribute?(:discount_type, String, from: "DiscountType")
25
25
 
26
26
  # @return [Money]
27
- attribute?(:landed_price, Money, from: "landedPrice")
27
+ attribute?(:landed_price, Money, from: "LandedPrice")
28
28
 
29
- # @return [String] The seller identifier for the offer.
30
- attribute?(:seller_id, String, from: "sellerId")
29
+ # @return [Points]
30
+ attribute?(:points, Points, from: "Points")
31
+
32
+ # @return [String] The seller identifier for the offer
33
+ attribute?(:seller_id, String, from: "SellerId")
31
34
 
32
35
  # @return [Money]
33
- attribute?(:shipping, Money)
36
+ attribute?(:shipping, Money, from: "Shipping")
34
37
  end
35
38
  end
36
39
  end
@@ -9,28 +9,31 @@ module Peddler
9
9
  module B2BAnyOfferChanged
10
10
  LowestPrice = Structure.new do
11
11
  # @return [String]
12
- attribute(:condition, String)
12
+ attribute(:condition, String, from: "Condition")
13
13
 
14
14
  # @return [String]
15
- attribute(:fulfillment_channel, String, from: "fulfillmentChannel")
15
+ attribute(:fulfillment_channel, String, from: "FulfillmentChannel")
16
16
 
17
17
  # @return [Money]
18
- attribute(:listing_price, Money, from: "listingPrice")
18
+ attribute(:listing_price, Money, from: "ListingPrice")
19
19
 
20
20
  # @return [String]
21
- attribute(:offer_type, String, from: "offerType")
21
+ attribute(:offer_type, String, from: "OfferType")
22
22
 
23
23
  # @return [String]
24
- attribute(:quantity_tier, String, from: "quantityTier")
24
+ attribute(:quantity_tier, String, from: "QuantityTier")
25
25
 
26
26
  # @return [String]
27
- attribute?(:discount_type, String, from: "discountType")
27
+ attribute?(:discount_type, String, from: "DiscountType")
28
28
 
29
29
  # @return [Money]
30
- attribute?(:landed_price, Money, from: "landedPrice")
30
+ attribute?(:landed_price, Money, from: "LandedPrice")
31
+
32
+ # @return [Points]
33
+ attribute?(:points, Points, from: "Points")
31
34
 
32
35
  # @return [Money]
33
- attribute?(:shipping, Money)
36
+ attribute?(:shipping, Money, from: "Shipping")
34
37
  end
35
38
  end
36
39
  end
@@ -9,26 +9,23 @@ module Peddler
9
9
  module B2BAnyOfferChanged
10
10
  # Notification envelope with metadata
11
11
  Notification = Structure.new do
12
- # @return [String] The date and time in ISO 8601 format in UTC time that the event which triggered the
13
- # notification occurred.
14
- attribute(:event_time, String, from: "eventTime")
12
+ # @return [String] The date and time (in UTC) that the event which triggered the notification occurred
13
+ attribute(:event_time, String, from: "EventTime")
15
14
 
16
15
  # @return [String]
17
- attribute(:notification_metadata, String, from: "notificationMetadata")
16
+ attribute(:notification_metadata, String, from: "NotificationMetadata")
18
17
 
19
- # @return [String] The notification type. Combined with the payload version this controls the structure of the
20
- # payload object.
21
- attribute(:notification_type, String, from: "notificationType")
18
+ # @return [String] The notification type. Combined with payload version controls the structure of payload object
19
+ attribute(:notification_type, String, from: "NotificationType")
22
20
 
23
- # @return [String] The notification version. This controls the structure of the notification.
24
- attribute(:notification_version, String, from: "notificationVersion")
21
+ # @return [String] The notification version. This controls the structure of the notification
22
+ attribute(:notification_version, String, from: "NotificationVersion")
25
23
 
26
24
  # @return [Payload]
27
- attribute(:payload, Payload)
25
+ attribute(:payload, Payload, from: "Payload")
28
26
 
29
- # @return [String] The payload version. Combined with the notification type this controls the structure of the
30
- # payload object.
31
- attribute(:payload_version, String, from: "payloadVersion")
27
+ # @return [String] The payload version. Combined with notification type controls the structure of payload
28
+ attribute(:payload_version, String, from: "PayloadVersion")
32
29
  end
33
30
  end
34
31
  end
@@ -8,17 +8,17 @@ module Peddler
8
8
  module Notifications
9
9
  module B2BAnyOfferChanged
10
10
  NotificationMetadata = Structure.new do
11
- # @return [String] The identifier for the application that uses the notifications.
12
- attribute(:application_id, String, from: "applicationId")
11
+ # @return [String] The identifier for the application that uses the notifications
12
+ attribute(:application_id, String, from: "ApplicationId")
13
13
 
14
- # @return [String] A unique identifier for this notification instance.
15
- attribute(:notification_id, String, from: "notificationId")
14
+ # @return [String] A unique identifier for this notification instance
15
+ attribute(:notification_id, String, from: "NotificationId")
16
16
 
17
- # @return [String] The date and time in ISO 8601 format in UTC time that the notification was sent.
18
- attribute(:publish_time, String, from: "publishTime")
17
+ # @return [String] The date and time (in UTC) that the notification was sent
18
+ attribute(:publish_time, String, from: "PublishTime")
19
19
 
20
- # @return [String] A unique identifier for the subscription which resulted in this notification.
21
- attribute(:subscription_id, String, from: "subscriptionId")
20
+ # @return [String] A unique identifier for the subscription which resulted in this notification
21
+ attribute(:subscription_id, String, from: "SubscriptionId")
22
22
  end
23
23
  end
24
24
  end
@@ -3,52 +3,54 @@
3
3
  # This file is generated. Do not edit.
4
4
 
5
5
  require "structure"
6
- require "time"
7
6
 
8
7
  module Peddler
9
8
  module Notifications
10
9
  module B2BAnyOfferChanged
11
10
  Offer = Structure.new do
12
- # @return [:boolean] True when fulfilled by Amazon.
13
- attribute(:fulfilled_by_amazon, :boolean, from: "isFulfilledByAmazon")
11
+ # @return [:boolean] Indicates whether the offer is fulfilled by Amazon
12
+ attribute(:fulfilled_by_amazon, :boolean, from: "IsFulfilledByAmazon")
14
13
 
15
14
  # @return [Money]
16
- attribute(:listing_price, Money, from: "listingPrice")
15
+ attribute(:listing_price, Money, from: "ListingPrice")
17
16
 
18
- # @return [String] The seller identifier for the offer.
19
- attribute(:seller_id, String, from: "sellerId")
17
+ # @return [String] The seller identifier for the offer
18
+ attribute(:seller_id, String, from: "SellerId")
20
19
 
21
20
  # @return [Money]
22
- attribute(:shipping, Money)
21
+ attribute(:shipping, Money, from: "Shipping")
23
22
 
24
- # @return [ShippingTime]
25
- attribute(:shipping_time, ShippingTime, from: "shippingTime")
23
+ # @return [Hash]
24
+ attribute(:shipping_time, Hash, from: "ShippingTime")
26
25
 
27
- # @return [String] The subcondition of the item.
28
- attribute(:sub_condition, String, from: "subCondition")
26
+ # @return [String] The subcondition of the item
27
+ attribute(:sub_condition, String, from: "SubCondition")
29
28
 
30
- # @return [String] Information about the condition of the item.
31
- attribute?(:condition_notes, String, from: "conditionNotes")
29
+ # @return [String] Information about the condition of the item
30
+ attribute?(:condition_notes, String, from: "ConditionNotes")
32
31
 
33
- # @return [:boolean] True when the offer is currently in the Buy Box. There can be up to two Buy Box winners at
34
- # any time per ASIN, one that is eligible for Prime and one that is not eligible for Prime.
35
- attribute?(:buy_box_winner, :boolean, from: "isBuyBoxWinner")
32
+ # @return [:boolean] Indicates whether the offer is currently in the Buy Box. There can be up to two Buy Box
33
+ # winners at any time per ASIN, one that is eligible for Prime and one that is not eligible for Prime
34
+ attribute?(:buy_box_winner, :boolean, from: "IsBuyBoxWinner")
36
35
 
37
- # @return [:boolean] True when the seller of the item is eligible to win the Buy Box.
38
- attribute?(:featured_merchant, :boolean, from: "isFeaturedMerchant")
36
+ # @return [:boolean] Indicates whether the seller of the item is eligible to win the Buy Box
37
+ attribute?(:featured_merchant, :boolean, from: "IsFeaturedMerchant")
38
+
39
+ # @return [Points]
40
+ attribute?(:points, Points, from: "Points")
39
41
 
40
42
  # @return [PrimeInformation]
41
- attribute?(:prime_information, PrimeInformation, from: "primeInformation")
43
+ attribute?(:prime_information, PrimeInformation, from: "PrimeInformation")
42
44
 
43
45
  # @return [Array<QuantityDiscountPriceType>] Contains a list of pricing information that includes special
44
- # pricing when buying in bulk.
45
- attribute?(:quantity_discount_price, [QuantityDiscountPriceType], from: "quantityDiscountPrice")
46
+ # pricing when buying in bulk
47
+ attribute?(:quantity_discount_price, [QuantityDiscountPriceType], from: "QuantityDiscountPrice")
46
48
 
47
49
  # @return [SellerFeedbackRating]
48
- attribute?(:seller_feedback_rating, SellerFeedbackRating, from: "sellerFeedbackRating")
50
+ attribute?(:seller_feedback_rating, SellerFeedbackRating, from: "SellerFeedbackRating")
49
51
 
50
52
  # @return [ShipsFrom]
51
- attribute?(:ships_from, ShipsFrom, from: "shipsFrom")
53
+ attribute?(:ships_from, ShipsFrom, from: "ShipsFrom")
52
54
  end
53
55
  end
54
56
  end