inpost_uk_api 0.2.4 → 0.2.5

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: 8ca535feef8feacc23eea8c863db020eaddce4b2e18605c8ecd902d094b19bf4
4
- data.tar.gz: 8ae0307a7022ad320e2dc15e25bf759cf7a8681db35a07c95f98b238c44764ca
3
+ metadata.gz: 16249a785877b88d4deca9f3906fd728eff2047ad79dd66764f6074f90ae7240
4
+ data.tar.gz: 9e3b049006a653badbec3b593ab9103c19b71e41f53233ced8a132a7aa782f5e
5
5
  SHA512:
6
- metadata.gz: 4657f6257d958d733004523e7fd82f3fc61a6d563173531d49482a14072dfd1e6c3f52f23dec1c052efca0dd04b99525d86ad889833c9d4721266cd0ff3b97c4
7
- data.tar.gz: de3171aec2b3f3a169178f39fc92d42dd478eac22b379a1fa74e6511be7cd1dbcce8d05343e1c11825329c1fb8d5423521f7bd67a0c5ad502d42b36ccb862ba3
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 accept a block to set a temporary credentials. Useful for platform to set different InPost account for each retailer.
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InPostUKAPI
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inpost_uk_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Chong