pokepay_partner_ruby_sdk 0.1.14 → 0.1.18

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/index.md +1201 -145
  4. data/lib/pokepay_partner_ruby_sdk/client.rb +24 -13
  5. data/lib/pokepay_partner_ruby_sdk/request/create_campaign.rb +20 -0
  6. data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +17 -0
  7. data/lib/pokepay_partner_ruby_sdk/request/create_exchange_transaction.rb +2 -2
  8. data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +18 -0
  9. data/lib/pokepay_partner_ruby_sdk/request/create_payment_transaction.rb +2 -2
  10. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction.rb +2 -2
  11. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
  12. data/lib/pokepay_partner_ruby_sdk/request/create_transaction.rb +2 -2
  13. data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +2 -2
  14. data/lib/pokepay_partner_ruby_sdk/request/create_user_account.rb +15 -0
  15. data/lib/pokepay_partner_ruby_sdk/request/delete_account.rb +15 -0
  16. data/lib/pokepay_partner_ruby_sdk/request/get_cpm_token.rb +15 -0
  17. data/lib/pokepay_partner_ruby_sdk/request/get_transaction.rb +2 -2
  18. data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +2 -2
  19. data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +15 -0
  20. data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
  21. data/lib/pokepay_partner_ruby_sdk/request/update_account.rb +2 -2
  22. data/lib/pokepay_partner_ruby_sdk/request/update_customer_account.rb +15 -0
  23. data/lib/pokepay_partner_ruby_sdk/response/account.rb +3 -0
  24. data/lib/pokepay_partner_ruby_sdk/response/account_deleted.rb +11 -0
  25. data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +3 -0
  26. data/lib/pokepay_partner_ruby_sdk/response/account_status.rb +11 -0
  27. data/lib/pokepay_partner_ruby_sdk/response/account_with_user.rb +3 -0
  28. data/lib/pokepay_partner_ruby_sdk/response/account_without_private_money_detail.rb +3 -0
  29. data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +41 -0
  30. data/lib/pokepay_partner_ruby_sdk/response/cashtray_attempt.rb +1 -1
  31. data/lib/pokepay_partner_ruby_sdk/response/cashtray_with_result.rb +2 -2
  32. data/lib/pokepay_partner_ruby_sdk/response/cpm_token.rb +26 -0
  33. data/lib/pokepay_partner_ruby_sdk/response/external_transaction.rb +31 -0
  34. data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
  35. data/lib/pokepay_partner_ruby_sdk/response/product.rb +21 -0
  36. data/lib/pokepay_partner_ruby_sdk/response/transaction_detail.rb +39 -0
  37. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  38. data/lib/pokepay_partner_ruby_sdk.rb +15 -0
  39. data/partner.yaml +1326 -39
  40. data/pokepay_partner_ruby_sdk.gemspec +3 -3
  41. metadata +21 -6
@@ -12,20 +12,31 @@ require "pokepay_partner_ruby_sdk/crypto"
12
12
 
13
13
  module Pokepay
14
14
  class Client
15
- def initialize(path_to_inifile)
16
- path = File.expand_path(path_to_inifile)
17
- if File.exist?(path)
18
- ini = IniFile.load(path)
19
- else
20
- raise "init file does not exist."
15
+ def initialize(inifile_or_hash)
16
+ case inifile_or_hash
17
+ when String then
18
+ path = File.expand_path(inifile_or_hash)
19
+ if File.exist?(path)
20
+ ini = IniFile.load(path)
21
+ else
22
+ raise "init file does not exist."
23
+ end
24
+ @client_id = ini['global']['CLIENT_ID']
25
+ @client_secret = ini['global']['CLIENT_SECRET']
26
+ @api_base_url = URI.parse(ini['global']['API_BASE_URL'])
27
+ @ssl_key_file = ini['global']['SSL_KEY_FILE']
28
+ @ssl_cert_file = ini['global']['SSL_CERT_FILE']
29
+ @timezone = ini['global']['TIMEZONE']
30
+ @timeout = ini['global']['TIMEOUT']
31
+ when Hash then
32
+ @client_id = inifile_or_hash[:client_id]
33
+ @client_secret = inifile_or_hash[:client_secret]
34
+ @api_base_url = URI.parse(inifile_or_hash[:api_base_url])
35
+ @ssl_key_file = inifile_or_hash[:ssl_key_file]
36
+ @ssl_cert_file = inifile_or_hash[:ssl_cert_file]
37
+ @timezone = inifile_or_hash[:timezone]
38
+ @timeout = inifile_or_hash[:timeout]
21
39
  end
22
- @client_id = ini['global']['CLIENT_ID']
23
- @client_secret = ini['global']['CLIENT_SECRET']
24
- @api_base_url = URI.parse(ini['global']['API_BASE_URL'])
25
- @ssl_key_file = ini['global']['SSL_KEY_FILE']
26
- @ssl_cert_file = ini['global']['SSL_CERT_FILE']
27
- @timezone = ini['global']['TIMEZONE']
28
- @timeout = ini['global']['TIMEOUT']
29
40
  @http = Net::HTTP.new(@api_base_url.host, @api_base_url.port)
30
41
  if @api_base_url.scheme == 'https'
31
42
  @http.use_ssl = true
@@ -0,0 +1,20 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/campaign"
4
+
5
+ module Pokepay::Request
6
+ class CreateCampaign < Request
7
+ def initialize(name, private_money_id, starts_at, ends_at, priority, event, rest_args = {})
8
+ @path = "/campaigns"
9
+ @method = "POST"
10
+ @body_params = { "name" => name,
11
+ "private_money_id" => private_money_id,
12
+ "starts_at" => starts_at,
13
+ "ends_at" => ends_at,
14
+ "priority" => priority,
15
+ "event" => event }.merge(rest_args)
16
+ @response_class = Pokepay::Response::Campaign
17
+ end
18
+ attr_reader :response_class
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
+
5
+ module Pokepay::Request
6
+ class CreateCpmTransaction < Request
7
+ def initialize(cpm_token, shop_id, amount, rest_args = {})
8
+ @path = "/transactions" + "/cpm"
9
+ @method = "POST"
10
+ @body_params = { "cpm_token" => cpm_token,
11
+ "shop_id" => shop_id,
12
+ "amount" => amount }.merge(rest_args)
13
+ @response_class = Pokepay::Response::TransactionDetail
14
+ end
15
+ attr_reader :response_class
16
+ end
17
+ end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateExchangeTransaction < Request
@@ -11,7 +11,7 @@ module Pokepay::Request
11
11
  "sender_private_money_id" => sender_private_money_id,
12
12
  "receiver_private_money_id" => receiver_private_money_id,
13
13
  "amount" => amount }.merge(rest_args)
14
- @response_class = Pokepay::Response::Transaction
14
+ @response_class = Pokepay::Response::TransactionDetail
15
15
  end
16
16
  attr_reader :response_class
17
17
  end
@@ -0,0 +1,18 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/external_transaction"
4
+
5
+ module Pokepay::Request
6
+ class CreateExternalTransaction < Request
7
+ def initialize(shop_id, customer_id, private_money_id, amount, rest_args = {})
8
+ @path = "/external-transactions"
9
+ @method = "POST"
10
+ @body_params = { "shop_id" => shop_id,
11
+ "customer_id" => customer_id,
12
+ "private_money_id" => private_money_id,
13
+ "amount" => amount }.merge(rest_args)
14
+ @response_class = Pokepay::Response::ExternalTransaction
15
+ end
16
+ attr_reader :response_class
17
+ end
18
+ end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreatePaymentTransaction < Request
@@ -11,7 +11,7 @@ module Pokepay::Request
11
11
  "customer_id" => customer_id,
12
12
  "private_money_id" => private_money_id,
13
13
  "amount" => amount }.merge(rest_args)
14
- @response_class = Pokepay::Response::Transaction
14
+ @response_class = Pokepay::Response::TransactionDetail
15
15
  end
16
16
  attr_reader :response_class
17
17
  end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateTopupTransaction < Request
@@ -10,7 +10,7 @@ module Pokepay::Request
10
10
  @body_params = { "shop_id" => shop_id,
11
11
  "customer_id" => customer_id,
12
12
  "private_money_id" => private_money_id }.merge(rest_args)
13
- @response_class = Pokepay::Response::Transaction
13
+ @response_class = Pokepay::Response::TransactionDetail
14
14
  end
15
15
  attr_reader :response_class
16
16
  end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateTopupTransactionWithCheck < Request
@@ -9,7 +9,7 @@ module Pokepay::Request
9
9
  @method = "POST"
10
10
  @body_params = { "check_id" => check_id,
11
11
  "customer_id" => customer_id }
12
- @response_class = Pokepay::Response::Transaction
12
+ @response_class = Pokepay::Response::TransactionDetail
13
13
  end
14
14
  attr_reader :response_class
15
15
  end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateTransaction < Request
@@ -10,7 +10,7 @@ module Pokepay::Request
10
10
  @body_params = { "shop_id" => shop_id,
11
11
  "customer_id" => customer_id,
12
12
  "private_money_id" => private_money_id }.merge(rest_args)
13
- @response_class = Pokepay::Response::Transaction
13
+ @response_class = Pokepay::Response::TransactionDetail
14
14
  end
15
15
  attr_reader :response_class
16
16
  end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateTransferTransaction < Request
@@ -11,7 +11,7 @@ module Pokepay::Request
11
11
  "receiver_id" => receiver_id,
12
12
  "private_money_id" => private_money_id,
13
13
  "amount" => amount }.merge(rest_args)
14
- @response_class = Pokepay::Response::Transaction
14
+ @response_class = Pokepay::Response::TransactionDetail
15
15
  end
16
16
  attr_reader :response_class
17
17
  end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/account_detail"
4
+
5
+ module Pokepay::Request
6
+ class CreateUserAccount < Request
7
+ def initialize(user_id, private_money_id, rest_args = {})
8
+ @path = "/users" + "/" + user_id + "/accounts"
9
+ @method = "POST"
10
+ @body_params = { "private_money_id" => private_money_id }.merge(rest_args)
11
+ @response_class = Pokepay::Response::AccountDetail
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/account_deleted"
4
+
5
+ module Pokepay::Request
6
+ class DeleteAccount < Request
7
+ def initialize(account_id, rest_args = {})
8
+ @path = "/accounts" + "/" + account_id
9
+ @method = "DELETE"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::AccountDeleted
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/cpm_token"
4
+
5
+ module Pokepay::Request
6
+ class GetCpmToken < Request
7
+ def initialize(cpm_token)
8
+ @path = "/cpm" + "/" + cpm_token
9
+ @method = "GET"
10
+ @body_params = { }
11
+ @response_class = Pokepay::Response::CpmToken
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class GetTransaction < Request
@@ -8,7 +8,7 @@ module Pokepay::Request
8
8
  @path = "/transactions" + "/" + transaction_id
9
9
  @method = "GET"
10
10
  @body_params = { }
11
- @response_class = Pokepay::Response::Transaction
11
+ @response_class = Pokepay::Response::TransactionDetail
12
12
  end
13
13
  attr_reader :response_class
14
14
  end
@@ -4,10 +4,10 @@ require "pokepay_partner_ruby_sdk/response/paginated_account_details"
4
4
 
5
5
  module Pokepay::Request
6
6
  class ListUserAccounts < Request
7
- def initialize(user_id)
7
+ def initialize(user_id, rest_args = {})
8
8
  @path = "/users" + "/" + user_id + "/accounts"
9
9
  @method = "GET"
10
- @body_params = { }
10
+ @body_params = { }.merge(rest_args)
11
11
  @response_class = Pokepay::Response::PaginatedAccountDetails
12
12
  end
13
13
  attr_reader :response_class
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/external_transaction"
4
+
5
+ module Pokepay::Request
6
+ class RefundExternalTransaction < Request
7
+ def initialize(event_id, rest_args = {})
8
+ @path = "/external-transactions" + "/" + event_id + "/refund"
9
+ @method = "POST"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::ExternalTransaction
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/transaction"
3
+ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class RefundTransaction < Request
@@ -8,7 +8,7 @@ module Pokepay::Request
8
8
  @path = "/transactions" + "/" + transaction_id + "/refund"
9
9
  @method = "POST"
10
10
  @body_params = { }.merge(rest_args)
11
- @response_class = Pokepay::Response::Transaction
11
+ @response_class = Pokepay::Response::TransactionDetail
12
12
  end
13
13
  attr_reader :response_class
14
14
  end
@@ -1,6 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/account_detail"
3
+ require "pokepay_partner_ruby_sdk/response/account"
4
4
 
5
5
  module Pokepay::Request
6
6
  class UpdateAccount < Request
@@ -8,7 +8,7 @@ module Pokepay::Request
8
8
  @path = "/accounts" + "/" + account_id
9
9
  @method = "PATCH"
10
10
  @body_params = { }.merge(rest_args)
11
- @response_class = Pokepay::Response::AccountDetail
11
+ @response_class = Pokepay::Response::Account
12
12
  end
13
13
  attr_reader :response_class
14
14
  end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/account_with_user"
4
+
5
+ module Pokepay::Request
6
+ class UpdateCustomerAccount < Request
7
+ def initialize(account_id, rest_args = {})
8
+ @path = "/accounts" + "/" + account_id + "/customers"
9
+ @method = "PATCH"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::AccountWithUser
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -1,5 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
+ require "pokepay_partner_ruby_sdk/response/account_status"
3
4
  require "pokepay_partner_ruby_sdk/response/private_money"
4
5
 
5
6
  module Pokepay::Response
@@ -8,11 +9,13 @@ module Pokepay::Response
8
9
  @id = row["id"]
9
10
  @name = row["name"]
10
11
  @is_suspended = row["is_suspended"]
12
+ @status = AccountStatus.new(row["status"])
11
13
  @private_money = PrivateMoney.new(row["private_money"])
12
14
  end
13
15
  attr_reader :id
14
16
  attr_reader :name
15
17
  attr_reader :is_suspended
18
+ attr_reader :status
16
19
  attr_reader :private_money
17
20
  end
18
21
  end
@@ -0,0 +1,11 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+
4
+ module Pokepay::Response
5
+ class AccountDeleted
6
+ def initialize(row)
7
+
8
+ end
9
+
10
+ end
11
+ end
@@ -1,5 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
+ require "pokepay_partner_ruby_sdk/response/account_status"
3
4
  require "pokepay_partner_ruby_sdk/response/private_money"
4
5
  require "pokepay_partner_ruby_sdk/response/user"
5
6
 
@@ -9,6 +10,7 @@ module Pokepay::Response
9
10
  @id = row["id"]
10
11
  @name = row["name"]
11
12
  @is_suspended = row["is_suspended"]
13
+ @status = AccountStatus.new(row["status"])
12
14
  @balance = row["balance"]
13
15
  @money_balance = row["money_balance"]
14
16
  @point_balance = row["point_balance"]
@@ -18,6 +20,7 @@ module Pokepay::Response
18
20
  attr_reader :id
19
21
  attr_reader :name
20
22
  attr_reader :is_suspended
23
+ attr_reader :status
21
24
  attr_reader :balance
22
25
  attr_reader :money_balance
23
26
  attr_reader :point_balance
@@ -0,0 +1,11 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+
4
+ module Pokepay::Response
5
+ class AccountStatus
6
+ def initialize(row)
7
+
8
+ end
9
+
10
+ end
11
+ end
@@ -1,5 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
+ require "pokepay_partner_ruby_sdk/response/account_status"
3
4
  require "pokepay_partner_ruby_sdk/response/private_money"
4
5
  require "pokepay_partner_ruby_sdk/response/user"
5
6
 
@@ -9,12 +10,14 @@ module Pokepay::Response
9
10
  @id = row["id"]
10
11
  @name = row["name"]
11
12
  @is_suspended = row["is_suspended"]
13
+ @status = AccountStatus.new(row["status"])
12
14
  @private_money = PrivateMoney.new(row["private_money"])
13
15
  @user = User.new(row["user"])
14
16
  end
15
17
  attr_reader :id
16
18
  attr_reader :name
17
19
  attr_reader :is_suspended
20
+ attr_reader :status
18
21
  attr_reader :private_money
19
22
  attr_reader :user
20
23
  end
@@ -1,5 +1,6 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
+ require "pokepay_partner_ruby_sdk/response/account_status"
3
4
  require "pokepay_partner_ruby_sdk/response/user"
4
5
 
5
6
  module Pokepay::Response
@@ -8,12 +9,14 @@ module Pokepay::Response
8
9
  @id = row["id"]
9
10
  @name = row["name"]
10
11
  @is_suspended = row["is_suspended"]
12
+ @status = AccountStatus.new(row["status"])
11
13
  @private_money_id = row["private_money_id"]
12
14
  @user = User.new(row["user"])
13
15
  end
14
16
  attr_reader :id
15
17
  attr_reader :name
16
18
  attr_reader :is_suspended
19
+ attr_reader :status
17
20
  attr_reader :private_money_id
18
21
  attr_reader :user
19
22
  end
@@ -0,0 +1,41 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/user"
4
+ require "pokepay_partner_ruby_sdk/response/private_money"
5
+
6
+ module Pokepay::Response
7
+ class Campaign
8
+ def initialize(row)
9
+ @id = row["id"]
10
+ @name = row["name"]
11
+ @applicable_shops = row["applicable_shops"]
12
+ @is_exclusive = row["is_exclusive"]
13
+ @starts_at = row["starts_at"]
14
+ @ends_at = row["ends_at"]
15
+ @point_expires_at = row["point_expires_at"]
16
+ @point_expires_in_days = row["point_expires_in_days"]
17
+ @priority = row["priority"]
18
+ @description = row["description"]
19
+ @bear_point_shop = User.new(row["bear_point_shop"])
20
+ @private_money = PrivateMoney.new(row["private_money"])
21
+ @point_calculation_rule = row["point_calculation_rule"]
22
+ @point_calculation_rule_object = row["point_calculation_rule_object"]
23
+ @status = row["status"]
24
+ end
25
+ attr_reader :id
26
+ attr_reader :name
27
+ attr_reader :applicable_shops
28
+ attr_reader :is_exclusive
29
+ attr_reader :starts_at
30
+ attr_reader :ends_at
31
+ attr_reader :point_expires_at
32
+ attr_reader :point_expires_in_days
33
+ attr_reader :priority
34
+ attr_reader :description
35
+ attr_reader :bear_point_shop
36
+ attr_reader :private_money
37
+ attr_reader :point_calculation_rule
38
+ attr_reader :point_calculation_rule_object
39
+ attr_reader :status
40
+ end
41
+ end
@@ -5,7 +5,7 @@ require "pokepay_partner_ruby_sdk/response/account_with_user"
5
5
  module Pokepay::Response
6
6
  class CashtrayAttempt
7
7
  def initialize(row)
8
- @account = AccountWithUser.new(row["account"])
8
+ @account = row["account"] and AccountWithUser.new(row["account"])
9
9
  @status_code = row["status_code"]
10
10
  @error_type = row["error_type"]
11
11
  @error_message = row["error_message"]
@@ -14,8 +14,8 @@ module Pokepay::Response
14
14
  @expires_at = row["expires_at"]
15
15
  @canceled_at = row["canceled_at"]
16
16
  @token = row["token"]
17
- @attempt = CashtrayAttempt.new(row["attempt"])
18
- @transaction = Transaction.new(row["transaction"])
17
+ @attempt = row["attempt"] and CashtrayAttempt.new(row["attempt"])
18
+ @transaction = row["transaction"] and Transaction.new(row["transaction"])
19
19
  end
20
20
  attr_reader :id
21
21
  attr_reader :amount
@@ -0,0 +1,26 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/account_detail"
4
+ require "pokepay_partner_ruby_sdk/response/transaction"
5
+ require "pokepay_partner_ruby_sdk/response/external_transaction"
6
+
7
+ module Pokepay::Response
8
+ class CpmToken
9
+ def initialize(row)
10
+ @cpm_token = row["cpm_token"]
11
+ @account = AccountDetail.new(row["account"])
12
+ @transaction = row["transaction"] and Transaction.new(row["transaction"])
13
+ @event = row["event"] and ExternalTransaction.new(row["event"])
14
+ @scopes = row["scopes"]
15
+ @expires_at = row["expires_at"]
16
+ @metadata = row["metadata"]
17
+ end
18
+ attr_reader :cpm_token
19
+ attr_reader :account
20
+ attr_reader :transaction
21
+ attr_reader :event
22
+ attr_reader :scopes
23
+ attr_reader :expires_at
24
+ attr_reader :metadata
25
+ end
26
+ end
@@ -0,0 +1,31 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/user"
4
+ require "pokepay_partner_ruby_sdk/response/account"
5
+ require "pokepay_partner_ruby_sdk/response/user"
6
+ require "pokepay_partner_ruby_sdk/response/account"
7
+
8
+ module Pokepay::Response
9
+ class ExternalTransaction
10
+ def initialize(row)
11
+ @id = row["id"]
12
+ @is_modified = row["is_modified"]
13
+ @sender = User.new(row["sender"])
14
+ @sender_account = Account.new(row["sender_account"])
15
+ @receiver = User.new(row["receiver"])
16
+ @receiver_account = Account.new(row["receiver_account"])
17
+ @amount = row["amount"]
18
+ @done_at = row["done_at"]
19
+ @description = row["description"]
20
+ end
21
+ attr_reader :id
22
+ attr_reader :is_modified
23
+ attr_reader :sender
24
+ attr_reader :sender_account
25
+ attr_reader :receiver
26
+ attr_reader :receiver_account
27
+ attr_reader :amount
28
+ attr_reader :done_at
29
+ attr_reader :description
30
+ end
31
+ end
@@ -17,6 +17,7 @@ module Pokepay::Response
17
17
  @type = row["type"]
18
18
  @expiration_type = row["expiration_type"]
19
19
  @enable_topup_by_member = row["enable_topup_by_member"]
20
+ @display_money_and_point = row["display_money_and_point"]
20
21
  end
21
22
  attr_reader :id
22
23
  attr_reader :name
@@ -30,5 +31,6 @@ module Pokepay::Response
30
31
  attr_reader :type
31
32
  attr_reader :expiration_type
32
33
  attr_reader :enable_topup_by_member
34
+ attr_reader :display_money_and_point
33
35
  end
34
36
  end
@@ -0,0 +1,21 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+
4
+ module Pokepay::Response
5
+ class Product
6
+ def initialize(row)
7
+ @jan_code = row["jan_code"]
8
+ @name = row["name"]
9
+ @unit_price = row["unit_price"]
10
+ @price = row["price"]
11
+ @is_discounted = row["is_discounted"]
12
+ @other = row["other"]
13
+ end
14
+ attr_reader :jan_code
15
+ attr_reader :name
16
+ attr_reader :unit_price
17
+ attr_reader :price
18
+ attr_reader :is_discounted
19
+ attr_reader :other
20
+ end
21
+ end