starkinfra 0.3.0 → 0.4.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: 84494554057a87004d3c53122b4212049553964d4aae5a06b7045c104debbe61
4
- data.tar.gz: 227df256622a80f1e2e827c8aef4b7363a0307abb2f727b9ee82876dc942cef1
3
+ metadata.gz: dfe030935b84e3e7e9a9a96bcb145d726a2e696f0c5a01242775fd40a4f11346
4
+ data.tar.gz: 027fb38f86fbad096b1bd57ced082c11337b593910c3668aded8d94725982a16
5
5
  SHA512:
6
- metadata.gz: 7f077615c40b5066952932e8b771838665c203d6d4d238486abd4e2d07eba832da4a69b9610e086f525d7c38f499e1613275bdc7944d9d340d7d489fa2472637
7
- data.tar.gz: 0e646b2ec34f440339c48dd368e761d30e26a1edea765ee034b89816888135465e11d49b66bb812cb458520117d67af57356f41cfd33f2f0dbc50d8a2b2be8a7
6
+ metadata.gz: 0575a435a71032b94c887fe7df43a67fb284cc9c184ab9154b85de9f0a7c24f37ad444a9813a8d10d35ef4ef2e35ba53820ff2c95c6a97a531108cd6f03ace87
7
+ data.tar.gz: d23e36168a82bc5c917a30308383e830ff40cf0d8d5472953558676004e6a960e54fd34c7d95c67ebc5c268844b30ffd31766b3031f54cc75ab9ba5f5b3986e5
@@ -29,6 +29,7 @@ module StarkInfra
29
29
  # - acquirer_id [string]: acquirer ID. ex: '5656565656565656'
30
30
  # - merchant_id [string]: merchant ID. ex: '5656565656565656'
31
31
  # - merchant_name [string]: merchant name. ex: 'Google Cloud Platform'
32
+ # - metadata [dictionary object]: dictionary object used to store additional information about the IssuingPurchase object. ex: { authorizationId: 'OjZAqj' }
32
33
  # - merchant_fee [integer]: fee charged by the merchant to cover specific costs, such as ATM withdrawal logistics, etc. ex: 200 (= R$ 2.00)
33
34
  # - wallet_id [string]: virtual wallet ID. ex: '5656565656565656'
34
35
  # - method_code [string]: method code. Options: 'chip', 'token', 'server', 'manual', 'magstripe' or 'contactless'
@@ -50,7 +51,7 @@ module StarkInfra
50
51
  class IssuingPurchase < StarkInfra::Utils::Resource
51
52
  attr_reader :id, :holder_name, :product_id, :card_id, :card_ending, :purpose, :amount, :tax, :issuer_amount, :issuer_currency_code,
52
53
  :issuer_currency_symbol, :merchant_amount, :merchant_currency_code, :merchant_currency_symbol,
53
- :merchant_category_code, :merchant_country_code, :acquirer_id, :merchant_id, :merchant_name,
54
+ :merchant_category_code, :merchant_country_code, :acquirer_id, :merchant_id, :merchant_name, :metadata,
54
55
  :merchant_fee, :wallet_id, :method_code, :score, :end_to_end_id, :tags, :zip_code,
55
56
  :issuing_transaction_ids, :status, :updated, :created, :is_partial_allowed, :card_tags, :holder_tags
56
57
 
@@ -58,7 +59,7 @@ module StarkInfra
58
59
  id: nil, holder_name: nil, product_id: nil, card_id: nil, card_ending: nil, purpose: nil, amount: nil, tax: nil, issuer_amount: nil,
59
60
  issuer_currency_code: nil, issuer_currency_symbol: nil, merchant_amount: nil, merchant_currency_code: nil,
60
61
  merchant_currency_symbol: nil, merchant_category_code: nil, merchant_country_code: nil, acquirer_id: nil,
61
- merchant_id: nil, merchant_name: nil, merchant_fee: nil, wallet_id: nil, method_code: nil, score: nil,
62
+ merchant_id: nil, merchant_name: nil, metadata: nil, merchant_fee: nil, wallet_id: nil, method_code: nil, score: nil,
62
63
  end_to_end_id: nil, tags: nil, zip_code: nil, issuing_transaction_ids: nil, status: nil, updated: nil, created: nil,
63
64
  is_partial_allowed: nil, card_tags:nil, holder_tags:nil
64
65
  )
@@ -81,6 +82,7 @@ module StarkInfra
81
82
  @acquirer_id = acquirer_id
82
83
  @merchant_id = merchant_id
83
84
  @merchant_name = merchant_name
85
+ @metadata = metadata
84
86
  @merchant_fee = merchant_fee
85
87
  @wallet_id = wallet_id
86
88
  @method_code = method_code
@@ -131,8 +133,8 @@ module StarkInfra
131
133
  #
132
134
  # ## Return:
133
135
  # - generator of IssuingPurchases objects with updated attributes
134
- def self.query(ids: nil, limit: nil, after: nil, before: nil, end_to_end_ids: nil, holder_ids: nil, card_ids: nil,
135
- status: nil, user: nil)
136
+ def self.query(ids: nil, limit: nil, after: nil, before: nil, end_to_end_ids: nil, holder_ids: nil, card_ids: nil, status: nil, user: nil)
137
+
136
138
  after = StarkInfra::Utils::Checks.check_date(after)
137
139
  before = StarkInfra::Utils::Checks.check_date(before)
138
140
  StarkInfra::Utils::Rest.get_stream(
@@ -267,6 +269,7 @@ module StarkInfra
267
269
  acquirer_id: json['acquirer_id'],
268
270
  merchant_id: json['merchant_id'],
269
271
  merchant_name: json['merchant_name'],
272
+ metadata: json['metadata'],
270
273
  merchant_fee: json['merchant_fee'],
271
274
  wallet_id: json['wallet_id'],
272
275
  method_code: json['method_code'],
data/lib/utils/request.rb CHANGED
@@ -61,7 +61,7 @@ module StarkInfra
61
61
  req['Access-Time'] = access_time
62
62
  req['Access-Signature'] = signature
63
63
  req['Content-Type'] = 'application/json'
64
- req['User-Agent'] = "Ruby-#{RUBY_VERSION}-SDK-Infra-0.3.0"
64
+ req['User-Agent'] = "Ruby-#{RUBY_VERSION}-SDK-Infra-0.4.0"
65
65
  req['Accept-Language'] = language
66
66
 
67
67
  request = Net::HTTP.start(uri.hostname, use_ssl: true) { |http| http.request(req) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starkinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - starkinfra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-11 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: starkbank-ecdsa