muffin_man 1.5.10 → 1.5.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8f077ec0f83f067c863c9c704d1bbafe089fb2a86163334aec78a6c7b314e80
4
- data.tar.gz: 3d08c4f8b1669946ae37402a60e0a587dd86fb1c9178c90d930014a78dc5808f
3
+ metadata.gz: 21fbfbb3bf571a2579796ea01ae15ba51937fe467ea02273bbece69c42bc3f7f
4
+ data.tar.gz: '009d147c869d9db1e7f88e19354c2f35d33aafcad9a4fe6cccde702883616f9b'
5
5
  SHA512:
6
- metadata.gz: 37a390862e651d6d234253c3b5cf590ddee5299d53408b0c83a4a1a214a4e829ec94be63565d193191d0e5c714c24642054f20741a2b71175311f652aa4a3c1b
7
- data.tar.gz: 788dd07230db3c66e64d049db004e09b483120bba67bb17e5aa4d72d6624c5f9e07f6d4520ce33dad8bdcbb56db34a034eff17f98f9e24f5e7c10fcb902c8d4f
6
+ metadata.gz: b513821bcab220af5aa041e170426cb56cfffd3c14ff1e63569e28fa096fefb2af52e81d3c105dd9ec3c83b0155f5da59968c8640a9c91cd20f51da1173f0ebf
7
+ data.tar.gz: ec2675bd5c997d6279572c86defdae611d230fcc01c24045e2ed0c1838f04153227219bc1a75a162a1a52e36500a3ebff1f9f3119a1433dc8a7b1bef19637454
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.5.11
2
+
3
+ - Add sandbox support for inbound small parcel get labels
4
+
1
5
  # 1.5.10
2
6
 
3
7
  - Add sandbox support for inbound small parcel
@@ -63,18 +63,28 @@ module MuffinMan
63
63
  call_api
64
64
  end
65
65
 
66
+ SANDBOX_GET_LABELS_PARAMS = {
67
+ "shipmentId" => "348975493",
68
+ "PageType" => "PackageLabel_Letter_2",
69
+ "LabelType" => "BARCODE_2D"
70
+ }.freeze
66
71
  def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, package_labels_to_print: [], number_of_pallets: nil, page_size: nil, page_start_index: nil)
67
- @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
68
72
  @query_params = {
69
73
  "shipmentID" => shipment_id,
70
74
  "PageType" => page_type,
71
75
  "LabelType" => label_type
72
76
  }
73
- @query_params["NumberOfPackages"] = number_of_packages unless number_of_packages.nil?
74
- @query_params["PackageLabelsToPrint"] = package_labels_to_print.join(",") if package_labels_to_print.any?
75
- @query_params["NumberOfPallets"] = number_of_pallets unless number_of_pallets.nil?
76
- @query_params["PageSize"] = page_size unless page_size.nil?
77
- @query_params["PageStartIndex"] = page_start_index unless page_start_index.nil?
77
+ if sandbox
78
+ shipment_id = SANDBOX_GET_LABELS_PARAMS["shipmentId"]
79
+ @query_params = SANDBOX_GET_LABELS_PARAMS.except("shipmentId")
80
+ else
81
+ @query_params["NumberOfPackages"] = number_of_packages unless number_of_packages.nil?
82
+ @query_params["PackageLabelsToPrint"] = package_labels_to_print.join(",") if package_labels_to_print.any?
83
+ @query_params["NumberOfPallets"] = number_of_pallets unless number_of_pallets.nil?
84
+ @query_params["PageSize"] = page_size unless page_size.nil?
85
+ @query_params["PageStartIndex"] = page_start_index unless page_start_index.nil?
86
+ end
87
+ @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
78
88
  @request_type = "GET"
79
89
  call_api
80
90
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.5.10"
4
+ VERSION = "1.5.11"
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: 1.5.10
4
+ version: 1.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin