inpost_uk_api 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/inpost_uk_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16249a785877b88d4deca9f3906fd728eff2047ad79dd66764f6074f90ae7240
|
4
|
+
data.tar.gz: 9e3b049006a653badbec3b593ab9103c19b71e41f53233ced8a132a7aa782f5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17d31b882b324303ed3a47c44d3f8cd6c2301978ffd7711bd6a60f83e950b551a3772c98c421002dea7eb33e9b32c8cbc383a8bf79c7845d9211319d9c7d96b
|
7
|
+
data.tar.gz: 39edbc92de152ef1c46db4acc575f3d9844409dd8636c43a3fe142c2074d0a25bf78c95a0ef27c4b5518e9327f5d88b6c8bb3f4fe342a9acc0b3fac1b5468ce1
|
data/README.md
CHANGED
@@ -78,13 +78,15 @@ CSDDD_trackings = tracking.CSDDD
|
|
78
78
|
CSDDD_trackings.error # => "No events found for consignment CSDDD"
|
79
79
|
```
|
80
80
|
### Temporary credentials
|
81
|
-
You can use the `InPostUKAPI::Base.with_account` method which
|
81
|
+
You can use the `InPostUKAPI::Base.with_account` method which applies the temporary credentials to the codes in the block. Useful for platform to set different InPost account for each retailer.
|
82
82
|
|
83
83
|
Applicable to [Create a Returns Request](#create-a-returns-request) and [Get Returns QR Code](#get-returns-qr-code).
|
84
84
|
```ruby
|
85
85
|
re, label = nil
|
86
86
|
account = {retailer: "temp@postco.co", api_token: "temp token 123" }
|
87
87
|
InPostUKAPI::Base.with_account(account) do
|
88
|
+
# Now, retailer = "temp@postco.co" and api_token = "temp token 123"
|
89
|
+
|
88
90
|
re = InPostUKAPI::Return.new(
|
89
91
|
sender_email: "sender@postco.co",
|
90
92
|
sender_phone: "7999999999",
|
@@ -95,6 +97,7 @@ InPostUKAPI::Base.with_account(account) do
|
|
95
97
|
re.save
|
96
98
|
label = InPostUKAPI::ReturnLabel.find(re.id)
|
97
99
|
end
|
100
|
+
# Retailer and api_token now back to the one originally set.
|
98
101
|
```
|
99
102
|
|
100
103
|
|