Class: Bitex::UsdWithdrawal

Inherits:
Object
  • Object
show all
Defined in:
lib/bitex/usd_withdrawal.rb

Overview

A withdrawal of USD from your bitex.la balance

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#amountBigDecimal

Returns Amount withdrawn from your bitex USD balance.

Returns:

  • (BigDecimal)

    Amount withdrawn from your bitex USD balance.



14
15
16
# File 'lib/bitex/usd_withdrawal.rb', line 14

def amount
  @amount
end

#countrObject

Returns ISO country code.



37
# File 'lib/bitex/usd_withdrawal.rb', line 37

attr_accessor :country

#countryObject

Returns the value of attribute country.



37
38
39
# File 'lib/bitex/usd_withdrawal.rb', line 37

def country
  @country
end

#created_atTime

Returns Time when this withdrawal was requested by you.

Returns:

  • (Time)

    Time when this withdrawal was requested by you.



10
11
12
# File 'lib/bitex/usd_withdrawal.rb', line 10

def created_at
  @created_at
end

#currencyObject

Currency for this withdrawal.



41
42
43
# File 'lib/bitex/usd_withdrawal.rb', line 41

def currency
  @currency
end

#idInteger

Returns This UsdWithdrawal’s unique ID.

Returns:

  • (Integer)

    This UsdWithdrawal’s unique ID.



6
7
8
# File 'lib/bitex/usd_withdrawal.rb', line 6

def id
  @id
end

#instructionsObject



56
57
58
# File 'lib/bitex/usd_withdrawal.rb', line 56

def instructions
  @instructions
end

#kyc_profile_idObject



53
54
55
# File 'lib/bitex/usd_withdrawal.rb', line 53

def kyc_profile_id
  @kyc_profile_id
end

#labelObject



50
51
52
# File 'lib/bitex/usd_withdrawal.rb', line 50

def label
  @label
end

#payment_methodObject

Returns the payment method for this withdrawal.

  • :international_bank International bank transfer

  • :bb we’ll contact you regarding this withdrawal.



47
48
49
# File 'lib/bitex/usd_withdrawal.rb', line 47

def payment_method
  @payment_method
end

#reasonObject

Returns the reason for cancellation of this withdrawal, if any.

  • :not_cancelled

  • :insufficient_funds The instruction was received, but you didn’t have enough funds available

  • :no_instructions We could not understand the instructions you provided.

  • :recipient_unknown we could not issue this withdrawal because you’re not the receiving party.



33
34
35
# File 'lib/bitex/usd_withdrawal.rb', line 33

def reason
  @reason
end

#statusObject

Returns the status of this withdrawal.

  • :received Our engine is checking if you have enough funds.

  • :pending your withdrawal was accepted and is being processed.

  • :done your withdrawal was processed and it’s on its way through the withdrawal channel you chose.

  • :cancelled your withdrawal could not be processed.



23
24
25
# File 'lib/bitex/usd_withdrawal.rb', line 23

def status
  @status
end

Class Method Details

.allObject



101
102
103
# File 'lib/bitex/usd_withdrawal.rb', line 101

def self.all
  Api.private(:get, "/private/usd/withdrawals").collect{|x| from_json(x) }
end

.create!(country, amount, currency, method, instructions, label, profile = nil) ⇒ Object



85
86
87
88
89
90
91
92
93
94
95
# File 'lib/bitex/usd_withdrawal.rb', line 85

def self.create!(country, amount, currency, method, instructions, label, profile=nil)
  from_json(Api.private(:post, "/private/usd/withdrawals", {
    country: country,
    amount: amount,
    currency: currency,
    payment_method: method,
    instructions: instructions,
    label: label,
    kyc_profile_id: profile,
  }))
end

.find(id) ⇒ Object



97
98
99
# File 'lib/bitex/usd_withdrawal.rb', line 97

def self.find(id)
  from_json(Api.private(:get, "/private/usd/withdrawals/#{id}"))
end