Class: WebPay::ChargeListRequest
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#count ⇒ Object
attributes accessors.
- #count=(value) ⇒ Object
- #created ⇒ Object
- #created=(value) ⇒ Object
- #customer ⇒ Object
- #customer=(value) ⇒ Object
-
#initialize(hash = {}) ⇒ ChargeListRequest
constructor
A new instance of ChargeListRequest.
- #offset ⇒ Object
- #offset=(value) ⇒ Object
- #query_params ⇒ Object
- #recursion ⇒ Object
- #recursion=(value) ⇒ Object
- #request_body ⇒ Object
- #shop ⇒ Object
- #shop=(value) ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ ChargeListRequest
Returns a new instance of ChargeListRequest.
628 629 630 631 632 |
# File 'lib/webpay/data_types.rb', line 628 def initialize(hash = {}) hash = normalize_hash(hash) hash['created'] = hash['created'].is_a?(Hash) ? WebPay::CreatedRange.new(hash['created']) : hash['created'] @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
611 612 613 |
# File 'lib/webpay/data_types.rb', line 611 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
618 619 620 621 622 623 624 625 626 |
# File 'lib/webpay/data_types.rb', line 618 def self.create(params) return params if params.is_a?(self) hash = case params when Hash; params else raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params) end self.new(hash) end |
.fields ⇒ Object
613 614 615 |
# File 'lib/webpay/data_types.rb', line 613 def self.fields ['count', 'offset', 'created', 'customer', 'recursion', 'shop'] end |
Instance Method Details
#count ⇒ Object
attributes accessors
653 654 655 |
# File 'lib/webpay/data_types.rb', line 653 def count attributes['count'] end |
#count=(value) ⇒ Object
657 658 659 |
# File 'lib/webpay/data_types.rb', line 657 def count=(value) attributes['count'] = value end |
#created ⇒ Object
669 670 671 |
# File 'lib/webpay/data_types.rb', line 669 def created attributes['created'] end |
#created=(value) ⇒ Object
673 674 675 676 |
# File 'lib/webpay/data_types.rb', line 673 def created=(value) value = value.is_a?(Hash) ? WebPay::CreatedRange.new(value) : value attributes['created'] = value end |
#customer ⇒ Object
678 679 680 |
# File 'lib/webpay/data_types.rb', line 678 def customer attributes['customer'] end |
#customer=(value) ⇒ Object
682 683 684 |
# File 'lib/webpay/data_types.rb', line 682 def customer=(value) attributes['customer'] = value end |
#offset ⇒ Object
661 662 663 |
# File 'lib/webpay/data_types.rb', line 661 def offset attributes['offset'] end |
#offset=(value) ⇒ Object
665 666 667 |
# File 'lib/webpay/data_types.rb', line 665 def offset=(value) attributes['offset'] = value end |
#query_params ⇒ Object
640 641 642 643 644 645 646 647 648 649 |
# File 'lib/webpay/data_types.rb', line 640 def query_params result = {} copy_if_exists(@attributes, result, 'count', 'query_params'); copy_if_exists(@attributes, result, 'offset', 'query_params'); copy_if_exists(@attributes, result, 'created', 'query_params'); copy_if_exists(@attributes, result, 'customer', 'query_params'); copy_if_exists(@attributes, result, 'recursion', 'query_params'); copy_if_exists(@attributes, result, 'shop', 'query_params'); return result end |
#recursion ⇒ Object
686 687 688 |
# File 'lib/webpay/data_types.rb', line 686 def recursion attributes['recursion'] end |
#recursion=(value) ⇒ Object
690 691 692 |
# File 'lib/webpay/data_types.rb', line 690 def recursion=(value) attributes['recursion'] = value end |
#request_body ⇒ Object
635 636 637 638 |
# File 'lib/webpay/data_types.rb', line 635 def request_body result = {} result end |
#shop ⇒ Object
694 695 696 |
# File 'lib/webpay/data_types.rb', line 694 def shop attributes['shop'] end |
#shop=(value) ⇒ Object
698 699 700 |
# File 'lib/webpay/data_types.rb', line 698 def shop=(value) attributes['shop'] = value end |