Class: BloomRemit2::Partner
- Inherits:
-
Object
- Object
- BloomRemit2::Partner
- Defined in:
- lib/bloom_remit2/partner.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#agent_ids ⇒ Object
readonly
Returns the value of attribute agent_ids.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#credit_in_php ⇒ Object
readonly
Returns the value of attribute credit_in_php.
-
#credit_in_vnd ⇒ Object
readonly
Returns the value of attribute credit_in_vnd.
-
#dest_currency ⇒ Object
readonly
Returns the value of attribute dest_currency.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#flat_fee_in_orig_currency ⇒ Object
readonly
Returns the value of attribute flat_fee_in_orig_currency.
-
#forex_margin ⇒ Object
readonly
Returns the value of attribute forex_margin.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#max_amount_in_orig_currency ⇒ Object
readonly
Returns the value of attribute max_amount_in_orig_currency.
-
#min_amount_in_orig_currency ⇒ Object
readonly
Returns the value of attribute min_amount_in_orig_currency.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#orig_currency ⇒ Object
readonly
Returns the value of attribute orig_currency.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
-
#zip_code ⇒ Object
readonly
Returns the value of attribute zip_code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, name, slug, domain, active, orig_currency, dest_currency, min_amount_in_orig_currency, max_amount_in_orig_currency, website, zip_code, country, phone, email, flat_fee_in_orig_currency, forex_margin, agent_ids, credit_in_php, credit_in_vnd) ⇒ Partner
constructor
A new instance of Partner.
Constructor Details
#initialize(id, name, slug, domain, active, orig_currency, dest_currency, min_amount_in_orig_currency, max_amount_in_orig_currency, website, zip_code, country, phone, email, flat_fee_in_orig_currency, forex_margin, agent_ids, credit_in_php, credit_in_vnd) ⇒ Partner
Returns a new instance of Partner.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/bloom_remit2/partner.rb', line 38 def initialize( id, name, slug, domain, active, orig_currency, dest_currency, min_amount_in_orig_currency, max_amount_in_orig_currency, website, zip_code, country, phone, email, flat_fee_in_orig_currency, forex_margin, agent_ids, credit_in_php, credit_in_vnd ) @id = id @name = name @slug = slug @domain = domain @active = active @orig_currency = orig_currency @dest_currency = dest_currency @min_amount_in_orig_currency = min_amount_in_orig_currency @max_amount_in_orig_currency = max_amount_in_orig_currency @website = website @zip_code = zip_code @country = country @phone = phone @email = email @flat_fee_in_orig_currency = flat_fee_in_orig_currency @forex_margin = forex_margin @agent_ids = agent_ids @credit_in_php = credit_in_php @credit_in_vnd = credit_in_vnd end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def active @active end |
#agent_ids ⇒ Object (readonly)
Returns the value of attribute agent_ids.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def agent_ids @agent_ids end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def country @country end |
#credit_in_php ⇒ Object (readonly)
Returns the value of attribute credit_in_php.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def credit_in_php @credit_in_php end |
#credit_in_vnd ⇒ Object (readonly)
Returns the value of attribute credit_in_vnd.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def credit_in_vnd @credit_in_vnd end |
#dest_currency ⇒ Object (readonly)
Returns the value of attribute dest_currency.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def dest_currency @dest_currency end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def domain @domain end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def email @email end |
#flat_fee_in_orig_currency ⇒ Object (readonly)
Returns the value of attribute flat_fee_in_orig_currency.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def flat_fee_in_orig_currency @flat_fee_in_orig_currency end |
#forex_margin ⇒ Object (readonly)
Returns the value of attribute forex_margin.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def forex_margin @forex_margin end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def id @id end |
#max_amount_in_orig_currency ⇒ Object (readonly)
Returns the value of attribute max_amount_in_orig_currency.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def max_amount_in_orig_currency @max_amount_in_orig_currency end |
#min_amount_in_orig_currency ⇒ Object (readonly)
Returns the value of attribute min_amount_in_orig_currency.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def min_amount_in_orig_currency @min_amount_in_orig_currency end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def name @name end |
#orig_currency ⇒ Object (readonly)
Returns the value of attribute orig_currency.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def orig_currency @orig_currency end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def phone @phone end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def slug @slug end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def website @website end |
#zip_code ⇒ Object (readonly)
Returns the value of attribute zip_code.
36 37 38 |
# File 'lib/bloom_remit2/partner.rb', line 36 def zip_code @zip_code end |
Class Method Details
.retrieve ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bloom_remit2/partner.rb', line 4 def retrieve response = Client.get(path).with_indifferent_access new( response[:id], response[:name], response[:slug], response[:domain], response[:active], response[:orig_currency], response[:dest_currency], response[:min_amount_in_orig_currency], response[:max_amount_in_orig_currency], response[:website], response[:zip_code], response[:country], response[:phone], response[:email], response[:flat_fee_in_orig_currency], response[:forex_margin], response[:agent_ids], response[:credit_in_php], response[:credit_in_vnd] ) end |