muffin_man 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49ec853c9c790152131d186d3b30b660f0f688fc390383183be87be38944f377
4
- data.tar.gz: 5e7e4f2ae5af32e5abbd7fc4a6da0d84c5ac9e9f2ffd3f6a5b1ea5931d413918
3
+ metadata.gz: e791c0a0feef05938dd2bf79e6f84a26f36e366afa3a4826ad4220ca362a293d
4
+ data.tar.gz: 220b1174a7c5f89377f09e7d7128bfa7dde46638cf4fcf74b346cfded646098e
5
5
  SHA512:
6
- metadata.gz: c708c548584bb883bce5663dc80f9aff62170cfbfcf4ea5f299acf0b98c12ae26a5dcfd35312b85561beb2dfec4059923e5755851225774d86c61a6b5793f507
7
- data.tar.gz: ec33e1214dd886a96fcf953391655596e160f6d0c8f69a439acf47fb3e5f2de44a0eb3a5b0d412f95bff5361afd2f1a92e054592b413fbd8fbf3eb93636c4acc
6
+ metadata.gz: b8cf67b773e5fdd61a4ddaf1f873277ef9cfbc848c8d8c28aab3b359931a23b7cc84c9a8a2e38918ba66e155d4c22ca64a8cfc762424aa99a340558daa4a2970
7
+ data.tar.gz: 48faca507a478218ea4512878a1c407ea7c31830c673156135d801d5e6945f86367733c4e695b6550ed130293ed126350987b09cb410868de23b4c3c50e2eb36
@@ -34,7 +34,7 @@ module MuffinMan
34
34
  ].freeze
35
35
 
36
36
  def get_queries(params = {})
37
- @local_var_path = "/datakiosk/2023-11-15/queries"
37
+ @local_var_path = "/dataKiosk/2023-11-15/queries"
38
38
  if sandbox
39
39
  params = {
40
40
  "pageSize" => SANDBOX_PAGE_SIZE,
@@ -47,7 +47,7 @@ module MuffinMan
47
47
  end
48
48
 
49
49
  def create_query(query, pagination_token = nil)
50
- @local_var_path = "/datakiosk/2023-11-15/queries"
50
+ @local_var_path = "/dataKiosk/2023-11-15/queries"
51
51
  query = SANDBOX_QUERY if sandbox
52
52
  @request_body = {
53
53
  "query" => query
@@ -59,29 +59,29 @@ module MuffinMan
59
59
 
60
60
  def get_query(query_id)
61
61
  query_id = SANDBOX_QUERY_ID if sandbox
62
- @local_var_path = "/datakiosk/2023-11-15/queries/#{query_id}"
62
+ @local_var_path = "/dataKiosk/2023-11-15/queries/#{query_id}"
63
63
  @request_type = "GET"
64
64
  call_api
65
65
  end
66
66
 
67
67
  def cancel_query(query_id)
68
68
  query_id = SANDBOX_QUERY_ID if sandbox
69
- @local_var_path = "/datakiosk/2023-11-15/queries/#{query_id}"
69
+ @local_var_path = "/dataKiosk/2023-11-15/queries/#{query_id}"
70
70
  @request_type = "DELETE"
71
71
  call_api
72
72
  end
73
73
 
74
74
  def get_document(document_id)
75
75
  document_id = SANDBOX_DOCUMENT_ID if sandbox
76
- @local_var_path = "/datakiosk/2023-11-15/documents/#{document_id}"
76
+ @local_var_path = "/dataKiosk/2023-11-15/documents/#{document_id}"
77
77
  @request_type = "GET"
78
78
  call_api
79
79
  end
80
80
 
81
- def download_document(document_id)
81
+ def retrieve_document_content(document_id)
82
82
  response = get_document(document_id)
83
83
  if response.success?
84
- Typhoeus.get(JSON.parse(response.body)["documentUrl"])
84
+ Typhoeus.get(JSON.parse(response.body)["documentUrl"], accept_encoding: "")
85
85
  else
86
86
  response
87
87
  end
@@ -17,6 +17,15 @@ module MuffinMan
17
17
  call_api
18
18
  end
19
19
 
20
+ def list_inbound_plan_items(inbound_plan_id, page_size: nil, pagination_token: nil)
21
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/items"
22
+ @query_params = {}
23
+ @query_params["pageSize"] = page_size if page_size
24
+ @query_params["paginationToken"] = pagination_token if pagination_token
25
+ @request_type = "GET"
26
+ call_api
27
+ end
28
+
20
29
  def get_inbound_plan(inbound_plan_id)
21
30
  @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}"
22
31
  @request_type = "GET"
@@ -37,6 +46,77 @@ module MuffinMan
37
46
  @request_type = "GET"
38
47
  call_api
39
48
  end
49
+
50
+ def create_inbound_plan(destination_marketplaces, items, source_address, name: nil)
51
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans"
52
+ @query_params = {}
53
+ @request_body = {
54
+ destinationMarketplaces: Array.wrap(destination_marketplaces),
55
+ items: items,
56
+ sourceAddress: source_address
57
+ }
58
+ @request_body["name"] = name if name
59
+ @request_type = "POST"
60
+ call_api
61
+ end
62
+
63
+ def generate_packing_options(inbound_plan_id)
64
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingOptions"
65
+ @request_type = "POST"
66
+ call_api
67
+ end
68
+
69
+ def list_packing_options(inbound_plan_id, page_size: nil, pagination_token: nil)
70
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingOptions"
71
+ @query_params = {}
72
+ @query_params["pageSize"] = page_size if page_size
73
+ @query_params["paginationToken"] = pagination_token if pagination_token
74
+ @request_type = "GET"
75
+ call_api
76
+ end
77
+
78
+ def list_packing_group_items(inbound_plan_id, packing_group_id, page_size: nil, pagination_token: nil)
79
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/items"
80
+ @query_params = {}
81
+ @query_params["pageSize"] = page_size if page_size
82
+ @query_params["paginationToken"] = pagination_token if pagination_token
83
+ @request_type = "GET"
84
+ call_api
85
+ end
86
+
87
+ def confirm_packing_option(inbound_plan_id, packing_option_id)
88
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingOptions/#{packing_option_id}/confirmation" # rubocop:disable Layout/LineLength
89
+ @request_type = "POST"
90
+ call_api
91
+ end
92
+
93
+ def set_packing_information(inbound_plan_id, body)
94
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/packingInformation"
95
+ @request_body = body
96
+ @request_type = "POST"
97
+ call_api
98
+ end
99
+
100
+ def generate_placement_options(inbound_plan_id)
101
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/placementOptions"
102
+ @request_type = "POST"
103
+ call_api
104
+ end
105
+
106
+ def list_placement_options(inbound_plan_id, page_size: nil, pagination_token: nil)
107
+ @local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/placementOptions"
108
+ @query_params = {}
109
+ @query_params["pageSize"] = page_size if page_size
110
+ @query_params["paginationToken"] = pagination_token if pagination_token
111
+ @request_type = "GET"
112
+ call_api
113
+ end
114
+
115
+ def get_inbound_operation_status(operation_id)
116
+ @local_var_path = "#{INBOUND_PATH}/operations/#{operation_id}"
117
+ @request_type = "GET"
118
+ call_api
119
+ end
40
120
  end
41
121
  end
42
122
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "2.2.1"
4
+ VERSION = "2.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muffin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-07-29 00:00:00.000000000 Z
13
+ date: 2024-08-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubygems_version: 3.4.19
213
+ rubygems_version: 3.1.6
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: Amazon Selling Partner API client