mx-platform-ruby 0.9.2 → 0.11.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +15 -15
  3. data/README.md +7 -7
  4. data/docs/MxPlatformApi.md +309 -90
  5. data/docs/PaymentAccountResponse.md +30 -0
  6. data/docs/PaymentAccountResponseBody.md +18 -0
  7. data/docs/PaymentProcessorAuthorizationCodeRequest.md +22 -0
  8. data/docs/PaymentProcessorAuthorizationCodeRequestBody.md +18 -0
  9. data/docs/PaymentProcessorAuthorizationCodeResponse.md +18 -0
  10. data/docs/PaymentProcessorAuthorizationCodeResponseBody.md +18 -0
  11. data/docs/PaymentProcessorTokenResponseBody.md +22 -0
  12. data/lib/mx-platform-ruby/api/mx_platform_api.rb +347 -131
  13. data/lib/mx-platform-ruby/configuration.rb +7 -0
  14. data/lib/mx-platform-ruby/models/payment_account_response.rb +279 -0
  15. data/lib/mx-platform-ruby/models/payment_account_response_body.rb +218 -0
  16. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +236 -0
  17. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +218 -0
  18. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +219 -0
  19. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +218 -0
  20. data/lib/mx-platform-ruby/models/payment_processor_token_response_body.rb +239 -0
  21. data/lib/mx-platform-ruby/version.rb +1 -1
  22. data/lib/mx-platform-ruby.rb +7 -0
  23. data/openapi/config.yml +1 -1
  24. data/openapi/templates/README.mustache +7 -7
  25. data/spec/api/mx_platform_api_spec.rb +55 -15
  26. data/spec/models/payment_account_response_body_spec.rb +34 -0
  27. data/spec/models/payment_account_response_spec.rb +70 -0
  28. data/spec/models/payment_processor_authorization_code_request_body_spec.rb +34 -0
  29. data/spec/models/payment_processor_authorization_code_request_spec.rb +46 -0
  30. data/spec/models/payment_processor_authorization_code_response_body_spec.rb +34 -0
  31. data/spec/models/payment_processor_authorization_code_response_spec.rb +34 -0
  32. data/spec/models/payment_processor_token_response_body_spec.rb +46 -0
  33. metadata +30 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 633ac15d0a242e33d7a2e6e8e822d33dcf49604fbbdd3ede811655ae6d333221
4
- data.tar.gz: 853e87b4bc16ae383ae138400cce437e4be86641b4d8d5f65d3bbc470f1baef4
3
+ metadata.gz: e9b7bf8cec23929cbf30de63f0882a276aaf37635577cb805acd1bd9afc9110d
4
+ data.tar.gz: 3bdab1f7207bb87e83d8ad6d709b964d2f0d26ea1e4282b61beae2e5301627a8
5
5
  SHA512:
6
- metadata.gz: aa179190cf17c5c79eebc03fdbcfd6cd3077a25d61ca668f2306715ca6433dc9d215110e933af9a6a646953a3a854c11118e20ecedfb40da219223a7615ac99b
7
- data.tar.gz: ca372ccfe3bd0937fe0cc3923ec8b04007abf750796707db7edcf003d4fa7196771f8eb3120339c404fd419ce07ae1076dafe17db8213bd150dd136d7093b3c0
6
+ metadata.gz: 2a23569dc78294f1114f252c26b1dd703731bbb14db753e190352c8a871d9432cff4641ad8579d272bc0ea1379022ea4d80bd328d03deaaa5f2f936d0363efd4
7
+ data.tar.gz: 4f17b42abd95b66f216a06a40600d9334b90d9d9c66d13a4e0de5120389af09a2cd06c1fe5c6f71f80d280491985949f9ba99cb79ee176676fdd620d1de37e5a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mx-platform-ruby (0.9.2)
4
+ mx-platform-ruby (0.11.0)
5
5
  faraday (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -11,7 +11,7 @@ GEM
11
11
  byebug (11.1.3)
12
12
  coderay (1.1.3)
13
13
  diff-lcs (1.5.0)
14
- faraday (1.9.3)
14
+ faraday (1.10.0)
15
15
  faraday-em_http (~> 1.0)
16
16
  faraday-em_synchrony (~> 1.0)
17
17
  faraday-excon (~> 1.1)
@@ -38,7 +38,7 @@ GEM
38
38
  method_source (1.0.0)
39
39
  multipart-post (2.1.1)
40
40
  parallel (1.21.0)
41
- parser (3.1.0.0)
41
+ parser (3.1.1.0)
42
42
  ast (~> 2.4.1)
43
43
  pry (0.13.1)
44
44
  coderay (~> 1.1)
@@ -50,19 +50,19 @@ GEM
50
50
  stringio
51
51
  rainbow (3.1.1)
52
52
  rake (13.0.6)
53
- rspec (3.10.0)
54
- rspec-core (~> 3.10.0)
55
- rspec-expectations (~> 3.10.0)
56
- rspec-mocks (~> 3.10.0)
57
- rspec-core (3.10.2)
58
- rspec-support (~> 3.10.0)
59
- rspec-expectations (3.10.2)
53
+ rspec (3.11.0)
54
+ rspec-core (~> 3.11.0)
55
+ rspec-expectations (~> 3.11.0)
56
+ rspec-mocks (~> 3.11.0)
57
+ rspec-core (3.11.0)
58
+ rspec-support (~> 3.11.0)
59
+ rspec-expectations (3.11.0)
60
60
  diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.10.0)
62
- rspec-mocks (3.10.3)
61
+ rspec-support (~> 3.11.0)
62
+ rspec-mocks (3.11.0)
63
63
  diff-lcs (>= 1.2.0, < 2.0)
64
- rspec-support (~> 3.10.0)
65
- rspec-support (3.10.3)
64
+ rspec-support (~> 3.11.0)
65
+ rspec-support (3.11.0)
66
66
  rubocop (0.66.0)
67
67
  jaro_winkler (~> 1.5.1)
68
68
  parallel (~> 1.10)
@@ -87,4 +87,4 @@ DEPENDENCIES
87
87
  rubocop (~> 0.66.0)
88
88
 
89
89
  BUNDLED WITH
90
- 2.3.6
90
+ 2.3.8
data/README.md CHANGED
@@ -38,7 +38,7 @@ Please follow the [installation](#installation) procedure and then run the follo
38
38
  ```ruby
39
39
  require 'mx-platform-ruby'
40
40
 
41
- MxPlatformRuby.configure do |config|
41
+ ::MxPlatformRuby.configure do |config|
42
42
  # Configure with your Client ID/API Key from https://dashboard.mx.com
43
43
  config.username = 'Your Client ID'
44
44
  config.password = 'Your API Key'
@@ -51,16 +51,16 @@ api_client = ::MxPlatformRuby::ApiClient.new
51
51
  api_client.default_headers['Accept'] = 'application/vnd.mx.api.v1+json'
52
52
  mx_platform_api = ::MxPlatformRuby::MxPlatformApi.new(api_client)
53
53
 
54
- user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new(
55
- user: MxPlatformRuby::UserCreateRequest.new(
56
- metadata: "Creating a user!"
54
+ request_body = ::MxPlatformRuby::UserCreateRequestBody.new(
55
+ user: ::MxPlatformRuby::UserCreateRequest.new(
56
+ metadata: 'Creating a user!'
57
57
  )
58
58
  )
59
59
 
60
60
  begin
61
- result = mx_platform_api.create_user(user_create_request_body)
62
- p result
63
- rescue MxPlatformRuby::ApiError => e
61
+ response = mx_platform_api.create_user(request_body)
62
+ p response
63
+ rescue ::MxPlatformRuby::ApiError => e
64
64
  puts "Error when calling MxPlatformApi->create_user: #{e}"
65
65
  end
66
66
  ```