mp_api 0.1.9 → 0.2.0

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: 7958b0b7c457103803f4add0d017a49d36e0eb420552ed406aebe9a9bb31a210
4
- data.tar.gz: 9421b7d5e0a50e7e4552f07f6319708b7abbb92b9e34925a1e2993f790155ba1
3
+ metadata.gz: 41b57c5bd90138e2152481283d9d873c550e4e019cf904d7ea4eb9332535cab6
4
+ data.tar.gz: 9d48cc465911ca89738e30116bc7634b3430d4fc96b5404d5d812fb8a0cd0751
5
5
  SHA512:
6
- metadata.gz: 90b2e88528da605933fc22078a737a6b16d48df84a57c1034850d3627a4331a0c26882a3ca786410d2a78ff1f844e0913ddeda90c3b6a05bb93fd5038decced7
7
- data.tar.gz: bda6cb3e8f9dabd483569564f7f542d0f00490722d783ead92ef10ec634afc07e06ac494f79448c48e21b4c016036e1a5809f4b530056b07c7fbe5270f8ab8a3
6
+ metadata.gz: 48911409a2221b723a972067988d02ebc7db00128f3863c445ef3ec171dd3f38812b25bf50f44a69e6b53ea57c93277df4d6e1326bd4f2fc9ef18cb0459eea1a
7
+ data.tar.gz: c75af862f424527d5034f4feeca1a6526339e80864fcf2fa340e275c82c1478594f78ef284eba99cb4be804fc6582e2c2c717da2af1f0d57232b1f979833c26c
@@ -10,8 +10,8 @@ module MpApi
10
10
  new(**build_hash(response))
11
11
  end
12
12
 
13
- attr_reader :status_detail, :three_ds_info_creq, :three_ds_info_external_resource_url, :three_d_secure_mode, :id, :description, :date_approved, :date_created, :money_release_date, :payer_email, :payer_identification_type, :payer_identification_number, :payment_method, :payment_type, :qr_code, :qr_code_base_64, :transaction_id, :ticket_url, :status, :amount, :token, :issuer_id, :installments
14
- def initialize(status_detail:nil, three_ds_info_creq:nil, three_ds_info_external_resource_url:nil, three_d_secure_mode:nil, id:nil, description:nil, date_approved:nil, date_created:nil, money_release_date:nil, payer_email:, payer_identification_type:, payer_identification_number:, payment_method:, payment_type:nil, qr_code:nil, qr_code_base_64:nil, transaction_id:nil, ticket_url:nil, status:nil, amount:, token:nil, issuer_id:nil, installments:nil)
13
+ attr_reader :status_detail, :three_ds_info_creq, :three_ds_info_external_resource_url, :three_d_secure_mode, :id, :description, :date_approved, :date_created, :money_release_date, :payer_email, :payer_identification_type, :payer_identification_number, :payment_method, :payment_type, :qr_code, :qr_code_base_64, :transaction_id, :ticket_url, :status, :amount, :token, :issuer_id, :installments, :statement_descriptor, :items
14
+ def initialize(status_detail:nil, three_ds_info_creq:nil, three_ds_info_external_resource_url:nil, three_d_secure_mode:nil, id:nil, description:nil, date_approved:nil, date_created:nil, money_release_date:nil, payer_email:, payer_identification_type:, payer_identification_number:, payment_method:, payment_type:nil, qr_code:nil, qr_code_base_64:nil, transaction_id:nil, ticket_url:nil, status:nil, amount:, token:nil, issuer_id:nil, installments:nil, items:nil, statement_descriptor:nil)
15
15
  @id = id
16
16
  @description = description
17
17
  @date_approved = date_approved
@@ -35,6 +35,16 @@ module MpApi
35
35
  @three_ds_info_external_resource_url = three_ds_info_external_resource_url
36
36
  @three_ds_info_creq = three_ds_info_creq
37
37
  @status_detail = status_detail
38
+ @statement_descriptor = statement_descriptor
39
+ @items = items
40
+ # Array example:
41
+ # {
42
+ # id: "100002",
43
+ # title: "Retrovisor Jeep",
44
+ # picture_url: "https://http2.mlstatic.com/D_NQ_NP_2X_754724-MLB73109764910_122023-F.webp",
45
+ # quantity: 4,
46
+ # unit_price: 3
47
+ # }
38
48
  end
39
49
 
40
50
  def build_json
@@ -45,6 +55,10 @@ module MpApi
45
55
  {
46
56
  transaction_amount: amount,
47
57
  description: description,
58
+ statement_descriptor: statement_descriptor,
59
+ additional_info: {
60
+ items: @items
61
+ },
48
62
  payment_method_id: payment_method,
49
63
  payer: {
50
64
  email: payer_email,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MpApi
4
- VERSION = "0.1.9"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mp_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - caio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-08 00:00:00.000000000 Z
11
+ date: 2023-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ac