easypost 4.4.0 → 4.5.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: c07c842f7ff2eb209a6f447259afce469b6e1f0f481ea2bf68585869167ea8f9
4
- data.tar.gz: 0ffb89bcb615cd1835f12e70d3c23ffa9ca9033daddddaad9db20a363f483212
3
+ metadata.gz: 10f43ed8bb80d557e81cb7904f2972d5869db45393e18d6d29374d8be9cb84da
4
+ data.tar.gz: 1956b7baf66e1906c3e0de4252c0563d914ec115d0eafb60a7b17e11493e9d89
5
5
  SHA512:
6
- metadata.gz: f03686d79b7d2023c26dc3c69362955465f3f99efc9b666d101a3499697ed155061afa2e8a47767bd83ae78bdd265d5363339ad4fb7686f47e5cff472483fa6a
7
- data.tar.gz: 25f79bcc1b8c745ae9556c675d3aad56a06518853b4389081325170d2c1c1e425906bb8ded8925d40805ef961c5ccea3394da7bfe1f845117a8701f80526d526
6
+ metadata.gz: 735164cd9f181b41aeca6e9f411ad190b6dfcd11772d8be7fa89f8764330dbb7e7578558c3a03b21253a5e98bc0bb4ce0f99ed87991a838719ff7fcb80464404
7
+ data.tar.gz: 5112f6462def1f310ec78ab55fb38c555888ec39adf9d0605e930a01ddbbc282b7635d08a4348b63d562b67dd6fa48111022e8404a330812cd4922f853bf840e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v4.5.0 (2022-07-18)
4
+
5
+ - Adds ability to generate shipment forms via `generate_form` function
6
+
3
7
  ## v4.4.0 (2022-07-11)
4
8
 
5
9
  - Adds `Billing.retrieve_payment_methods()`, `Billing.fund_wallet()`, and `Billing.delete_payment_method()` functions
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.4.0
1
+ 4.5.0
@@ -112,4 +112,19 @@ class EasyPost::Shipment < EasyPost::Resource
112
112
 
113
113
  lowest_smartrate
114
114
  end
115
+
116
+ # Generate a form for a Shipment.
117
+ def generate_form(form_type, form_options = {})
118
+ params = {}
119
+ params[:type] = form_type
120
+ merged_params = params.merge(form_options)
121
+ wrapped_params = {
122
+ form: merged_params,
123
+ }
124
+
125
+ response = EasyPost.make_request(:post, "#{url}/forms", @api_key, wrapped_params)
126
+ refresh_from(response, @api_key)
127
+
128
+ self
129
+ end
115
130
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easypost
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - EasyPost Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-11 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brakeman