pokepay_partner_ruby_sdk 0.1.15.1 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/docs/index.md +1802 -198
- data/lib/pokepay_partner_ruby_sdk/client.rb +8 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_campaign.rb +20 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_exchange_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_payment_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_user_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/delete_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_campaign.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/list_campaigns.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_transactions_v2.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/update_campaign.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/update_customer_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/account.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_deleted.rb +11 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +5 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_status.rb +11 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_with_user.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_without_private_money_detail.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +44 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_campaigns.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_transaction_v2.rb +19 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/transaction_detail.rb +39 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk.rb +16 -0
- data/partner.yaml +1866 -76
- metadata +18 -2
@@ -52,6 +52,11 @@ module Pokepay
|
|
52
52
|
200 <= code and code < 300
|
53
53
|
end
|
54
54
|
|
55
|
+
def is_server_error(res)
|
56
|
+
code = res.code.to_i
|
57
|
+
500 <= code and code < 600
|
58
|
+
end
|
59
|
+
|
55
60
|
def request(request_class, path, body_params, response_class)
|
56
61
|
encrypt_data = { 'request_data' => body_params,
|
57
62
|
'timestamp' => Time.now.iso8601(6),
|
@@ -61,6 +66,9 @@ module Pokepay
|
|
61
66
|
req = request_class.new(path)
|
62
67
|
req.set_form_data(params)
|
63
68
|
res = @http.start { @http.request(req) }
|
69
|
+
if is_server_error(res) then
|
70
|
+
raise format("Server Error (code: %s)", res.code)
|
71
|
+
end
|
64
72
|
res_map = JSON.parse(res.body)
|
65
73
|
if(res_map["response_data"]) then
|
66
74
|
res.body =
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# DO NOT EDIT: File is generated by code generator.
|
2
2
|
|
3
|
-
require "pokepay_partner_ruby_sdk/response/
|
3
|
+
require "pokepay_partner_ruby_sdk/response/transaction_detail"
|
4
4
|
|
5
5
|
module Pokepay::Request
|
6
6
|
class CreateCpmTransaction < Request
|
@@ -10,7 +10,7 @@ module Pokepay::Request
|
|
10
10
|
@body_params = { "cpm_token" => cpm_token,
|
11
11
|
"shop_id" => shop_id,
|
12
12
|
"amount" => amount }.merge(rest_args)
|
13
|
-
@response_class = Pokepay::Response::
|
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/
|
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::
|
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/
|
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::
|
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/
|
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::
|
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/
|
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::
|
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/
|
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::
|
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/
|
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::
|
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/campaign"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class GetCampaign < Request
|
7
|
+
def initialize(campaign_id)
|
8
|
+
@path = "/campaigns" + "/" + campaign_id
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { }
|
11
|
+
@response_class = Pokepay::Response::Campaign
|
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/
|
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::
|
11
|
+
@response_class = Pokepay::Response::TransactionDetail
|
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/paginated_campaigns"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class ListCampaigns < Request
|
7
|
+
def initialize(private_money_id, rest_args = {})
|
8
|
+
@path = "/campaigns"
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { "private_money_id" => private_money_id }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::PaginatedCampaigns
|
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/paginated_transaction_v2"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class ListTransactionsV2 < Request
|
7
|
+
def initialize(private_money_id, rest_args = {})
|
8
|
+
@path = "/transactions-v2"
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { "private_money_id" => private_money_id }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::PaginatedTransactionV2
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
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/
|
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::
|
11
|
+
@response_class = Pokepay::Response::TransactionDetail
|
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/campaign"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class UpdateCampaign < Request
|
7
|
+
def initialize(campaign_id, rest_args = {})
|
8
|
+
@path = "/campaigns" + "/" + campaign_id
|
9
|
+
@method = "PATCH"
|
10
|
+
@body_params = { }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::Campaign
|
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_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
|
@@ -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,19 +10,23 @@ 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"]
|
15
17
|
@private_money = PrivateMoney.new(row["private_money"])
|
16
18
|
@user = User.new(row["user"])
|
19
|
+
@external_id = row["external_id"]
|
17
20
|
end
|
18
21
|
attr_reader :id
|
19
22
|
attr_reader :name
|
20
23
|
attr_reader :is_suspended
|
24
|
+
attr_reader :status
|
21
25
|
attr_reader :balance
|
22
26
|
attr_reader :money_balance
|
23
27
|
attr_reader :point_balance
|
24
28
|
attr_reader :private_money
|
25
29
|
attr_reader :user
|
30
|
+
attr_reader :external_id
|
26
31
|
end
|
27
32
|
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,44 @@
|
|
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
|
+
require "pokepay_partner_ruby_sdk/response/private_money"
|
6
|
+
|
7
|
+
module Pokepay::Response
|
8
|
+
class Campaign
|
9
|
+
def initialize(row)
|
10
|
+
@id = row["id"]
|
11
|
+
@name = row["name"]
|
12
|
+
@applicable_shops = row["applicable_shops"]
|
13
|
+
@is_exclusive = row["is_exclusive"]
|
14
|
+
@starts_at = row["starts_at"]
|
15
|
+
@ends_at = row["ends_at"]
|
16
|
+
@point_expires_at = row["point_expires_at"]
|
17
|
+
@point_expires_in_days = row["point_expires_in_days"]
|
18
|
+
@priority = row["priority"]
|
19
|
+
@description = row["description"]
|
20
|
+
@bear_point_shop = User.new(row["bear_point_shop"])
|
21
|
+
@private_money = PrivateMoney.new(row["private_money"])
|
22
|
+
@dest_private_money = PrivateMoney.new(row["dest_private_money"])
|
23
|
+
@point_calculation_rule = row["point_calculation_rule"]
|
24
|
+
@point_calculation_rule_object = row["point_calculation_rule_object"]
|
25
|
+
@status = row["status"]
|
26
|
+
end
|
27
|
+
attr_reader :id
|
28
|
+
attr_reader :name
|
29
|
+
attr_reader :applicable_shops
|
30
|
+
attr_reader :is_exclusive
|
31
|
+
attr_reader :starts_at
|
32
|
+
attr_reader :ends_at
|
33
|
+
attr_reader :point_expires_at
|
34
|
+
attr_reader :point_expires_in_days
|
35
|
+
attr_reader :priority
|
36
|
+
attr_reader :description
|
37
|
+
attr_reader :bear_point_shop
|
38
|
+
attr_reader :private_money
|
39
|
+
attr_reader :dest_private_money
|
40
|
+
attr_reader :point_calculation_rule
|
41
|
+
attr_reader :point_calculation_rule_object
|
42
|
+
attr_reader :status
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/pagination"
|
4
|
+
|
5
|
+
module Pokepay::Response
|
6
|
+
class PaginatedCampaigns
|
7
|
+
def initialize(row)
|
8
|
+
@rows = row["rows"]
|
9
|
+
@count = row["count"]
|
10
|
+
@pagination = Pagination.new(row["pagination"])
|
11
|
+
end
|
12
|
+
attr_reader :rows
|
13
|
+
attr_reader :count
|
14
|
+
attr_reader :pagination
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
|
4
|
+
module Pokepay::Response
|
5
|
+
class PaginatedTransactionV2
|
6
|
+
def initialize(row)
|
7
|
+
@rows = row["rows"]
|
8
|
+
@per_page = row["per_page"]
|
9
|
+
@count = row["count"]
|
10
|
+
@next_page_cursor_id = row["next_page_cursor_id"]
|
11
|
+
@prev_page_cursor_id = row["prev_page_cursor_id"]
|
12
|
+
end
|
13
|
+
attr_reader :rows
|
14
|
+
attr_reader :per_page
|
15
|
+
attr_reader :count
|
16
|
+
attr_reader :next_page_cursor_id
|
17
|
+
attr_reader :prev_page_cursor_id
|
18
|
+
end
|
19
|
+
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,39 @@
|
|
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 TransactionDetail
|
10
|
+
def initialize(row)
|
11
|
+
@id = row["id"]
|
12
|
+
@type = row["type"]
|
13
|
+
@is_modified = row["is_modified"]
|
14
|
+
@sender = User.new(row["sender"])
|
15
|
+
@sender_account = Account.new(row["sender_account"])
|
16
|
+
@receiver = User.new(row["receiver"])
|
17
|
+
@receiver_account = Account.new(row["receiver_account"])
|
18
|
+
@amount = row["amount"]
|
19
|
+
@money_amount = row["money_amount"]
|
20
|
+
@point_amount = row["point_amount"]
|
21
|
+
@done_at = row["done_at"]
|
22
|
+
@description = row["description"]
|
23
|
+
@transfers = row["transfers"]
|
24
|
+
end
|
25
|
+
attr_reader :id
|
26
|
+
attr_reader :type
|
27
|
+
attr_reader :is_modified
|
28
|
+
attr_reader :sender
|
29
|
+
attr_reader :sender_account
|
30
|
+
attr_reader :receiver
|
31
|
+
attr_reader :receiver_account
|
32
|
+
attr_reader :amount
|
33
|
+
attr_reader :money_amount
|
34
|
+
attr_reader :point_amount
|
35
|
+
attr_reader :done_at
|
36
|
+
attr_reader :description
|
37
|
+
attr_reader :transfers
|
38
|
+
end
|
39
|
+
end
|