Module: GMO::Payment::RemittanceAPIMethods
- Included in:
- RemittanceAPI
- Defined in:
- lib/gmo/remittance_api.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#shop_id ⇒ Object
readonly
Returns the value of attribute shop_id.
-
#shop_pass ⇒ Object
readonly
Returns the value of attribute shop_pass.
Instance Method Summary collapse
-
#cancel_deposit(options = {}) ⇒ Object
Method Deposit_ID Bank_ID Deposit_ID Bank_ID Method example ### gmo.cancel_deposit({ deposit_id: ‘dep00000’, bank_id: ‘bank00000’, }) “Bank_ID”=>“bank00000”, “Method”=>“2”.
-
#cancel_mail_deposit(options = {}) ⇒ Object
Method Deposit_ID Deposit_ID Method example ### gmo.cancel_mail_deposit({ deposit_id: ‘dep00001’, }) “Method”=>“2”.
-
#create_account(options = {}) ⇒ Object
Method Bank_ID Bank_Code Branch_Code Account_Type Account_Name Account_Number Branch_Code_Jpbank Account_Number_Jpbank Free Bank_ID Method ErrCode ErrInfo example ### gmo.create_account({ bank_id: ‘bank00000’, bank_code: ‘0001’, branch_code: ‘813’, account_type: :normal, account_name: ‘An Yutzy’, account_number: ‘0012345’, branch_code_jp: ‘00567’, account_number_jp: ‘01234567’, free: ‘foobar’ # Metadata }) “Method”=>“1”.
-
#create_deposit(options = {}) ⇒ Object
Method Deposit_ID Bank_ID Amount Deposit_ID Bank_ID Method Amount Bank_Fee example ### gmo.create_deposit({ deposit_id: ‘dep00000’, bank_id: ‘bank00000’, amount: ‘1000’ }) “Bank_ID”=>“bank00000”, “Method”=>“1”, “Amount”=>“1000”, “Bank_Fee”=>“27”.
-
#create_mail_deposit(options = {}) ⇒ Object
Method Deposit_ID Mail_Address Amount Mail_Deposit_Account_Name Expire Shop_Mail_Address Method Amount Deposit_ID Expire example ### gmo.create_mail_deposit({ deposit_id: ‘dep00001’, deposit_email: ‘[email protected]’, amount: 1000, deposit_account_name: ‘An Yutzy’, expire: 5, deposit_shop_email: ‘[email protected]’ }) “Method”=>“1”, “Amount”=>“1200”, “Expire”=>“20170503”.
-
#delete_account(options = {}) ⇒ Object
Method Bank_ID Bank_ID Method ErrCode ErrInfo example ### gmo.delete_account({ bank_id: ‘bank00000’, }) “Method”=>“3”.
- #initialize(options = {}) ⇒ Object
-
#search_account(options = {}) ⇒ Object
Bank_ID Bank_ID Delete_Flag Bank_Name Bank_Code Branch_Name Branch_Code Account_Type Account_Number Account_Name Free Branch_Code_Jpbank Account_Number_Jpbank example ### gmo.search_account({ bank_id: ‘bank12345’ }) “Delete_Flag”=>“0”, “Bank_Name”=>“みずほ銀行”, “Bank_Code”=>“0001”, “Branch_Name”=>“札幌支店”, “Branch_Code”=>“813”, “Account_Type”=>“1”, “Account_Number”=>“0012345”, “Account_Name”=>“An Yutzy”, “Free”=>“”, “Branch_Code_Jpbank”=>“”, “Account_Number_Jpbank”=>“”.
-
#search_balance(options = {}) ⇒ Object
Shop_ID Balance Balance_Forecast example ### gmo.search_balance “Balance”=>“9818965”, “Balance_Forecast”=>“9818965”.
-
#search_deposit(options = {}) ⇒ Object
Deposit_ID Deposit_ID Bank_ID Bank_Name Bank_Code Branch_Name Branch_Code Account_Type Account_Number Account_Name Free Amount Bank_Fee Result Branch_Code_Jpbank Account_Number_Jpbank Deposit_Date Result_Detail example ### gmo.search_deposit({ deposit_id: ‘dep00000’ }) “Bank_ID”=>“bank163144”, “Bank_Name”=>“みずほ銀行”, “Bank_Code”=>“0001”, “Branch_Name”=>“札幌支店”, “Branch_Code”=>“813”, “Account_Type”=>“1”, “Account_Number”=>“0012345”, “Account_Name”=>“An Yutzy”, “Free”=>“”, “Amount”=>“181035”, “Bank_Fee”=>“270”, “Result”=>“0”, “Branch_Code_Jpbank”=>“”, “Account_Number_Jpbank”=>“”, “Deposit_Date”=>“”, “Result_Detail”=>“”.
-
#search_mail_deposit(options = {}) ⇒ Object
Deposit_ID Deposit_ID Mail_Address Shop_Mail_Address Account_Name Amount Expire Status example ### gmo.search_mail_deposit({ deposit_id: ‘dep00001’ }) “Mail_Address”=>“[email protected]”, “Shop_Mail_Address”=>“[email protected]”, “Account_Name”=>“An Yutzy”, “Amount”=>“1000”, “Expire”=>“20170503”, “Status”=>“0”.
-
#update_account(options = {}) ⇒ Object
Method Bank_ID Bank_Code Branch_Code Account_Type Account_Name Account_Number Branch_Code_Jpbank Account_Number_Jpbank Free Bank_ID Method ErrCode ErrInfo example ### gmo.update_account({ bank_id: ‘bank00000’, bank_code: ‘0001’, branch_code: ‘813’, account_type: :normal, account_name: ‘An Yutzy’, account_number: ‘0012345’, branch_code_jp: ‘00567’, account_number_jp: ‘01234567’, free: ‘foobar’ # Metadata }) “Method”=>“2”.
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
26 27 28 |
# File 'lib/gmo/remittance_api.rb', line 26 def host @host end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
26 27 28 |
# File 'lib/gmo/remittance_api.rb', line 26 def locale @locale end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
26 27 28 |
# File 'lib/gmo/remittance_api.rb', line 26 def shop_id @shop_id end |
#shop_pass ⇒ Object (readonly)
Returns the value of attribute shop_pass.
26 27 28 |
# File 'lib/gmo/remittance_api.rb', line 26 def shop_pass @shop_pass end |
Instance Method Details
#cancel_deposit(options = {}) ⇒ Object
Method Deposit_ID Bank_ID Deposit_ID Bank_ID Method example ### gmo.cancel_deposit(
deposit_id: 'dep00000',
bank_id: 'bank00000',
) “Bank_ID”=>“bank00000”, “Method”=>“2”
192 193 194 195 196 197 198 |
# File 'lib/gmo/remittance_api.rb', line 192 def cancel_deposit( = {}) name = "/api/DepositRegistration.idPass" [:method] = 2 required = %i(bank_id deposit_id) (required, ) post_request name, end |
#cancel_mail_deposit(options = {}) ⇒ Object
Method Deposit_ID Deposit_ID Method example ### gmo.cancel_mail_deposit(
deposit_id: 'dep00001',
) “Method”=>“2”
287 288 289 290 291 292 293 |
# File 'lib/gmo/remittance_api.rb', line 287 def cancel_mail_deposit( = {}) name = "/api/MailDepositRegistration.idPass" [:method] = 2 required = %i(deposit_id) (required, ) post_request name, end |
#create_account(options = {}) ⇒ Object
Method Bank_ID Bank_Code Branch_Code Account_Type Account_Name Account_Number Branch_Code_Jpbank Account_Number_Jpbank Free Bank_ID Method ErrCode ErrInfo example ### gmo.create_account(
bank_id: 'bank00000',
bank_code: '0001',
branch_code: '813',
account_type: :normal,
account_name: 'An Yutzy',
account_number: '0012345',
branch_code_jp: '00567',
account_number_jp: '01234567',
free: 'foobar' # Metadata
) “Method”=>“1”
57 58 59 60 61 62 63 64 |
# File 'lib/gmo/remittance_api.rb', line 57 def create_account( = {}) name = "/api/AccountRegistration.idPass" [:method] = 1 [:account_type] = GMO::Const::ACCOUNT_TYPES_MAP[[:account_type]] required = %i(bank_id bank_code branch_code account_type account_name account_number) (required, ) post_request name, end |
#create_deposit(options = {}) ⇒ Object
Method Deposit_ID Bank_ID Amount Deposit_ID Bank_ID Method Amount Bank_Fee example ### gmo.create_deposit(
deposit_id: 'dep00000',
bank_id: 'bank00000',
amount: '1000'
) “Bank_ID”=>“bank00000”, “Method”=>“1”, “Amount”=>“1000”, “Bank_Fee”=>“27”
170 171 172 173 174 175 176 |
# File 'lib/gmo/remittance_api.rb', line 170 def create_deposit( = {}) name = "/api/DepositRegistration.idPass" [:method] = 1 required = %i(bank_id deposit_id amount) (required, ) post_request name, end |
#create_mail_deposit(options = {}) ⇒ Object
Method Deposit_ID Mail_Address Amount Mail_Deposit_Account_Name Expire Shop_Mail_Address Method Amount Deposit_ID Expire example ### gmo.create_mail_deposit(
deposit_id: 'dep00001',
deposit_email: '[email protected]',
amount: 1000,
deposit_account_name: 'An Yutzy',
expire: 5,
deposit_shop_email: '[email protected]'
) “Method”=>“1”, “Amount”=>“1200”, “Expire”=>“20170503”
268 269 270 271 272 273 274 |
# File 'lib/gmo/remittance_api.rb', line 268 def create_mail_deposit( = {}) name = "/api/MailDepositRegistration.idPass" [:method] = 1 required = %i(deposit_id deposit_email amount deposit_account_name expire deposit_shop_email) (required, ) post_request name, end |
#delete_account(options = {}) ⇒ Object
Method Bank_ID Bank_ID Method ErrCode ErrInfo example ### gmo.delete_account(
bank_id: 'bank00000',
) “Method”=>“3”
117 118 119 120 121 122 123 |
# File 'lib/gmo/remittance_api.rb', line 117 def delete_account( = {}) name = "/api/AccountRegistration.idPass" [:method] = 3 required = %i(bank_id) (required, ) post_request name, end |
#initialize(options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/gmo/remittance_api.rb', line 17 def initialize( = {}) @shop_id = [:shop_id] @shop_pass = [:shop_pass] @host = [:host] @locale = .fetch(:locale, GMO::Const::DEFAULT_LOCALE) unless @shop_id && @shop_pass && @host raise ArgumentError, "Initialize must receive a hash with :shop_id, :shop_pass and either :host! (received #{.inspect})" end end |
#search_account(options = {}) ⇒ Object
Bank_ID Bank_ID Delete_Flag Bank_Name Bank_Code Branch_Name Branch_Code Account_Type Account_Number Account_Name Free Branch_Code_Jpbank Account_Number_Jpbank example ### gmo.search_account(
bank_id: 'bank12345'
) “Delete_Flag”=>“0”, “Bank_Name”=>“みずほ銀行”, “Bank_Code”=>“0001”, “Branch_Name”=>“札幌支店”, “Branch_Code”=>“813”, “Account_Type”=>“1”, “Account_Number”=>“0012345”, “Account_Name”=>“An Yutzy”, “Free”=>“”, “Branch_Code_Jpbank”=>“”, “Account_Number_Jpbank”=>“”
145 146 147 148 149 150 |
# File 'lib/gmo/remittance_api.rb', line 145 def search_account( = {}) name = "/api/AccountSearch.idPass" required = %i(bank_id) (required, ) post_request name, end |
#search_balance(options = {}) ⇒ Object
Shop_ID Balance Balance_Forecast example ### gmo.search_balance “Balance”=>“9818965”, “Balance_Forecast”=>“9818965”
240 241 242 243 |
# File 'lib/gmo/remittance_api.rb', line 240 def search_balance( = {}) name = "/api/BalanceSearch.idPass" post_request name, end |
#search_deposit(options = {}) ⇒ Object
Deposit_ID Deposit_ID Bank_ID Bank_Name Bank_Code Branch_Name Branch_Code Account_Type Account_Number Account_Name Free Amount Bank_Fee Result Branch_Code_Jpbank Account_Number_Jpbank Deposit_Date Result_Detail example ### gmo.search_deposit(
deposit_id: 'dep00000'
) “Bank_ID”=>“bank163144”, “Bank_Name”=>“みずほ銀行”, “Bank_Code”=>“0001”, “Branch_Name”=>“札幌支店”, “Branch_Code”=>“813”, “Account_Type”=>“1”, “Account_Number”=>“0012345”, “Account_Name”=>“An Yutzy”, “Free”=>“”, “Amount”=>“181035”, “Bank_Fee”=>“270”, “Result”=>“0”, “Branch_Code_Jpbank”=>“”, “Account_Number_Jpbank”=>“”, “Deposit_Date”=>“”, “Result_Detail”=>“”
225 226 227 228 229 230 |
# File 'lib/gmo/remittance_api.rb', line 225 def search_deposit( = {}) name = "/api/DepositSearch.idPass" required = %i(deposit_id) (required, ) post_request name, end |
#search_mail_deposit(options = {}) ⇒ Object
Deposit_ID Deposit_ID Mail_Address Shop_Mail_Address Account_Name Amount Expire Status example ### gmo.search_mail_deposit(
deposit_id: 'dep00001'
) “Mail_Address”=>“[email protected]”, “Shop_Mail_Address”=>“[email protected]”, “Account_Name”=>“An Yutzy”, “Amount”=>“1000”, “Expire”=>“20170503”, “Status”=>“0”
310 311 312 313 314 315 |
# File 'lib/gmo/remittance_api.rb', line 310 def search_mail_deposit( = {}) name = "/api/MailDepositSearch.idPass" required = %i(deposit_id) (required, ) post_request name, end |
#update_account(options = {}) ⇒ Object
Method Bank_ID Bank_Code Branch_Code Account_Type Account_Name Account_Number Branch_Code_Jpbank Account_Number_Jpbank Free Bank_ID Method ErrCode ErrInfo example ### gmo.update_account(
bank_id: 'bank00000',
bank_code: '0001',
branch_code: '813',
account_type: :normal,
account_name: 'An Yutzy',
account_number: '0012345',
branch_code_jp: '00567',
account_number_jp: '01234567',
free: 'foobar' # Metadata
) “Method”=>“2”
95 96 97 98 99 100 101 102 |
# File 'lib/gmo/remittance_api.rb', line 95 def update_account( = {}) name = "/api/AccountRegistration.idPass" [:method] = 2 [:account_type] = GMO::Const::ACCOUNT_TYPES_MAP[[:account_type]] required = %i(bank_id bank_code branch_code account_type account_name account_number) (required, ) post_request name, end |